-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simple network runner library -- -- Simple functions to run network clients and servers. @package network-run @version 0.4.0 -- | Simple functions to run TCP clients and servers. module Network.Run.TCP -- | Running a TCP server with an accepted socket and its peer name. -- -- This is the same as: -- --
-- runTCPServerWithSocketOptions [] --runTCPServer :: Maybe HostName -> ServiceName -> (Socket -> IO a) -> IO a -- | Running a TCP client with a connected socket for a given listen -- socket. runTCPServerWithSocket :: Socket -> (Socket -> IO a) -> IO a -- | Open TCP socket for server use -- -- This is the same as: -- --
-- openTCPServerSocketWithOptions [] --openTCPServerSocket :: AddrInfo -> IO Socket -- | Open socket for server use, and set the provided options before -- binding. -- -- In addition to the given options, the socket is configured to -- --
-- runTCPClientWithSettings defaultSettings --runTCPClient :: HostName -> ServiceName -> (Socket -> IO a) -> IO a -- | Settings for client. data Settings -- | Default settings. defaultSettings :: Settings -- | Opening a socket. Use openClientSocketWithOptions to specify -- SocketOption settingsOpenClientSocket :: Settings -> AddrInfo -> IO Socket -- | Running a TCP client with a connected socket. runTCPClientWithSettings :: Settings -> HostName -> ServiceName -> (Socket -> IO a) -> IO a -- | This is the same as -- --
-- openClientSocketWithOptions [] --openClientSocket :: AddrInfo -> IO Socket openClientSocketWithOptions :: [(SocketOption, Int)] -> AddrInfo -> IO Socket -- | Simple functions to run TCP clients and servers. module Network.Run.TCP.Timeout -- | Running a TCP server with a connected socket. runTCPServer :: Int -> Maybe HostName -> ServiceName -> TimeoutServer a -> IO a -- | A server type type TimeoutServer a = -- | A global timeout manager Manager -> -- | A thread-local timeout handler Handle -> -- | A connected socket Socket -> IO a -- | Running a TCP client with a connected socket for a given listen -- socket. runTCPServerWithSocket :: Int -> Socket -> TimeoutServer a -> IO a -- | Open socket for server use -- -- This is the same as: -- --
-- openServerSocketWithOptions [] --openServerSocket :: AddrInfo -> IO Socket -- | Open socket for server use, and set the provided options before -- binding. -- -- In addition to the given options, the socket is configured to -- --