Hermes-0.0.4: Message-based middleware layer

Network.Hermes.Net

Synopsis

Documentation

streamServerSource

Arguments

:: Address 
-> (Handle -> Address -> IO ())

Function called to handle connections

-> IO (IO ())

Returns an action you may use to kill the server

Creates a TCP server that will hand off incoming connections to new threads.

Killing the server does not kill these forked threads.

The handle passed to your action will be automatically closed when that action returns.

data Address Source

Constructors

IP HostName Int

Host name and port, IPv4, IPv6, or both

IPv4 HostName Int

IPv4 only

IPv6 HostName Int

IPv6 only

Unix FilePath

Unix domain socket, not available on Windows

resolve :: Address -> IO SockAddrSource

Returns the best fit only, or a DNSFailure exception