Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides convenience functions for interfacing unix-socket.
This module is only exported on platforms with Unix domain socket support.
This module is intended to be imported qualified
, e.g.:
import Data.Connection import qualified System.IO.Streams.UnixSocket as UnixSocket import qualified System.IO.Streams.TCP as TCP
Since: 1.0
Synopsis
- connect :: String -> IO TCPConnection
- connectSocket :: String -> IO (Socket, SockAddr)
- bindAndListen :: Int -> String -> IO Socket
client
Convenience function for initiating an raw TCP connection to the given unix-socket file.
Note that sending an end-of-file to the returned OutputStream
will not
close the underlying Socket connection.
server
bindAndListen :: Int -> String -> IO Socket Source #
Bind and listen on a unix-socket with a limit on connection count.
Use accept
/ acceptWith
to accept new unix socket connections.