courier-0.1.1.5: A message-passing library for simplifying network applications

Copyright(c) Phil Hargett 2015
LicenseMIT (see LICENSE file)
Maintainerphil@haphazardhouse.net
Stabilityexperimental
Portabilitynon-portable (requires STM)
Safe HaskellNone
LanguageHaskell98

Network.Transport.Sockets

Description

Helpers for socket transports.

Synopsis

Documentation

data SocketConnection Source #

A SocketConnection encapsulates the state of a single outbound connection.

socketConnect :: Mailboxes -> Connect -> Endpoint -> Name -> IO Connection Source #

Establish a connector for exchanging messages from Endpoint with a destination specified by Name.

socketListen :: Family -> SocketType -> Resolver -> Name -> IO Socket Source #

Listens for new connections on a new Socket, and return the Socket.

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.

type Resolver = Name -> IO [SockAddr] Source #

A Resolver translates a name into a list of SockAddr for use with a socket-based Transport.

resolve1 :: Resolver -> Name -> IO SockAddr Source #

Helper to resolve a Name to a single SockAddr for use with a socket-based Transport.

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.

wildcard :: SockAddr -> IO SockAddr Source #

Returns the wildcard SockAddr for the specified SockAddr, if possible.