postmaster-0.1: Postmaster ESMTP ServerContentsIndex
Network.Postmaster.IO
PortabilityHaskell 2-pre
Stabilityprovisional
Maintainersimons@cryp.to
Contents
Socket Handlers
Non-blocking I/O
Description
Synopsis
type SocketHandler = (Socket, SockAddr) -> IO ()
listener :: PortID -> SocketHandler -> IO ()
acceptor :: SocketHandler -> Socket -> IO ()
type LazyHandler = (Handle, Maybe SockAddr) -> IO ()
handleLazy :: IOMode -> LazyHandler -> SocketHandler
data WriteTimeout = WriteTimeout Timeout
setReadTimeout :: Timeout -> Smtpd ()
getReadTimeout :: Smtpd Timeout
setWriteTimeout :: Timeout -> Smtpd ()
getWriteTimeout :: Smtpd Timeout
safeWrite :: IO a -> Smtpd a
safeReply :: WriteHandle -> SmtpReply -> Smtpd ()
safeFlush :: WriteHandle -> Smtpd ()
Socket Handlers
type SocketHandler = (Socket, SockAddr) -> IO ()
listener :: PortID -> SocketHandler -> IO ()
Creates a listening socket for the given port, then calls acceptor to start the given computation for every incoming connection.
acceptor :: SocketHandler -> Socket -> IO ()
Given a listening socket, this function will loop forever accepting incoming connections. For each connection a SocketHandler thread is forked.
type LazyHandler = (Handle, Maybe SockAddr) -> IO ()
handleLazy :: IOMode -> LazyHandler -> SocketHandler
Non-blocking I/O
data WriteTimeout
The exception we throw when writes time out. ReadTimeout is throw by System.IO.Driver.
Constructors
WriteTimeout Timeout
show/hide Instances
setReadTimeout :: Timeout -> Smtpd ()
getReadTimeout :: Smtpd Timeout
setWriteTimeout :: Timeout -> Smtpd ()
getWriteTimeout :: Smtpd Timeout
safeWrite :: IO a -> Smtpd a
safeReply :: WriteHandle -> SmtpReply -> Smtpd ()
safeFlush :: WriteHandle -> Smtpd ()
Produced by Haddock version 2.1.0