| Portability | portable |
|---|---|
| Stability | provisional |
| Maintainer | Sigbjorn Finne <sof@forkIO.com> |
Network.Connection
Description
Taking care of the details of creating & tearing down network connections, both client and server connections.
- data ClientOptions = ClientOptions {}
- clientOpts :: ClientOptions
- data Connection = Connection {}
- data ConnectionOptions = ConnectionOptions {}
- defaultConnectionOptions :: ConnectionOptions
- clientConnection :: ClientOptions -> IO Connection
- data Server
- data ServerOptions = ServerOptions {}
- serverOpts :: ServerOptions
- newServer :: ServerOptions -> IO Server
- acceptConnection :: Server -> IO (Connection, SockAddr)
- closeConnection :: Connection -> IO ()
- closeSession :: Connection -> Server -> IO ()
Documentation
data ClientOptions Source
Constructors
| ClientOptions | |
Fields
| |
Instances
data Connection Source
clientConnection :: ClientOptions -> IO ConnectionSource
clientConnection opts tries to open up a connection
as requested by the ClientOptions opts. If successful, returns
a Handle and its underlying Socket. The latter is only meant
to be used when doing orderly & draining shutdowns. All I/O is
expected to happen over the Handle.
data ServerOptions Source
Constructors
| ServerOptions | |
Fields | |
newServer :: ServerOptions -> IO ServerSource
acceptConnection :: Server -> IO (Connection, SockAddr)Source
closeConnection :: Connection -> IO ()Source
closeSession :: Connection -> Server -> IO ()Source