tcp-streams-1.0.1.1: One stop solution for tcp client and server with tls support.

Safe HaskellNone
LanguageHaskell2010

System.IO.Streams.UnixSocket

Contents

Description

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

client

connect Source #

Arguments

:: String

unix-socket to connect to

-> IO TCPConnection 

Connect to unix-socket.

connectSocket Source #

Arguments

:: String

unix-socket to connect to

-> IO (Socket, SockAddr) 

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.