streaming-commons-0.1.7.3: Common lower-level functions needed by various streaming data libraries

Safe HaskellNone
LanguageHaskell98

Data.Streaming.Network.Internal

Synopsis

Documentation

data ServerSettings Source

Settings for a TCP server. It takes a port to listen on, and an optional hostname to bind to.

Constructors

ServerSettings 

Fields

serverPort :: !Int
 
serverHost :: !HostPreference
 
serverSocket :: !(Maybe Socket)

listening socket

serverAfterBind :: !(Socket -> IO ())
 
serverNeedLocalAddr :: !Bool
 

data ClientSettings Source

Settings for a TCP client, specifying how to connect to the server.

Constructors

ClientSettings 

Fields

clientPort :: !Int
 
clientHost :: !ByteString
 
clientAddrFamily :: !Family
 

data HostPreference Source

Which host to bind.

Note: The IsString instance recognizes the following special values:

  • * means HostAny
  • *4 means HostIPv4
  • !4 means HostIPv4Only
  • *6 means HostIPv6
  • !6 means HostIPv6Only

Any other values is treated as a hostname. As an example, to bind to the IPv4 local host only, use "127.0.0.1".

data Message Source

Representation of a single UDP message

Constructors

Message 

Fields

msgData :: !ByteString
 
msgSender :: !SockAddr
 

data AppData Source

The data passed to an Application.

Constructors

AppData 

Fields

appRead' :: !(IO ByteString)
 
appWrite' :: !(ByteString -> IO ())
 
appSockAddr' :: !SockAddr
 
appLocalAddr' :: !(Maybe SockAddr)
 
appCloseConnection' :: !(IO ())
 

data ServerSettingsUnix Source

Settings for a Unix domain sockets server.

Constructors

ServerSettingsUnix 

Fields

serverPath :: !FilePath
 
serverAfterBindUnix :: !(Socket -> IO ())
 

data ClientSettingsUnix Source

Settings for a Unix domain sockets client.

Constructors

ClientSettingsUnix 

Fields

clientPath :: !FilePath
 

data AppDataUnix Source

The data passed to a Unix domain sockets Application.

Constructors

AppDataUnix 

Fields

appReadUnix :: !(IO ByteString)
 
appWriteUnix :: !(ByteString -> IO ())