| Copyright | (c) Phil Hargett 2015 |
|---|---|
| License | MIT (see LICENSE file) |
| Maintainer | phil@haphazardhouse.net |
| Stability | experimental |
| Portability | non-portable (requires STM) |
| Safe Haskell | None |
| Language | Haskell98 |
Network.Transport.Sockets
Description
Helpers for socket transports.
- data SocketConnection = SocketConnection {
- connectionDestination :: TMVar Name
- sendSocketMessage :: Message -> IO ()
- receiveSocketMessage :: IO Message
- disconnectSocket :: IO ()
- type Connections = TVar (Map Name Connection)
- socketConnect :: Mailboxes -> Connect -> Endpoint -> Name -> IO Connection
- socketListen :: Family -> SocketType -> Resolver -> Name -> IO Socket
- messenger :: Mailboxes -> Endpoint -> SocketConnection -> IO ()
- connector :: Mailboxes -> Endpoint -> Name -> Connect -> IO ()
- type Resolver = Name -> IO [SockAddr]
- data ResolverException
- resolve1 :: Resolver -> Name -> IO SockAddr
- socketResolver4 :: SocketType -> Name -> IO [SockAddr]
- socketResolver6 :: SocketType -> Name -> IO [SockAddr]
- wildcard :: SockAddr -> IO SockAddr
- module Network.Transport
Documentation
data SocketConnection Source #
A SocketConnection encapsulates the state of a single outbound connection.
Constructors
| SocketConnection | |
Fields
| |
type Connections = TVar (Map Name Connection) Source #
Mutble Map of Names to Connections.
socketConnect :: Mailboxes -> Connect -> Endpoint -> Name -> IO Connection Source #
socketListen :: Family -> SocketType -> Resolver -> Name -> IO Socket Source #
messenger :: Mailboxes -> Endpoint -> SocketConnection -> IO () Source #
Exchange Messages with the Endpoint on the other side of a SocketConnection.
connector :: Mailboxes -> Endpoint -> Name -> Connect -> IO () Source #
Maintain a Connection between an Endpoint and a destination specified by Name. Should the connection,
the connection will automatically be re-attempted.
socketResolver4 :: SocketType -> Name -> IO [SockAddr] Source #
Variation of socketResolve for standard IP addresses.
socketResolver6 :: SocketType -> Name -> IO [SockAddr] Source #
Variation of socketResolve for standard IPv6 addresses.
module Network.Transport