conduit-extra
Safe HaskellNone
LanguageHaskell2010

Data.Conduit.Network.Unix

Synopsis

Basic utilities

sourceSocket :: forall (m :: Type -> Type) i. MonadIO m => Socket -> ConduitT i ByteString m () Source #

Stream data from the socket.

This function does not automatically close the socket.

Since 0.0.0

sinkSocket :: forall (m :: Type -> Type) o. MonadIO m => Socket -> ConduitT ByteString o m () Source #

Stream data to the socket.

This function does not automatically close the socket.

Since 0.0.0

Simple server/client interface

data AppDataUnix Source #

The data passed to a Unix domain sockets Application.

Instances

Instances details
HasReadWrite AppDataUnix Source # 
Instance details

Defined in Data.Streaming.Network

appSource :: forall ad (m :: Type -> Type) i. (HasReadWrite ad, MonadIO m) => ad -> ConduitT i ByteString m () Source #

appSink :: forall ad (m :: Type -> Type) o. (HasReadWrite ad, MonadIO m) => ad -> ConduitT ByteString o m () Source #

Server

data ServerSettingsUnix Source #

Settings for a Unix domain sockets server.

runUnixServer :: ServerSettingsUnix -> (AppDataUnix -> IO ()) -> IO a Source #

Run an Application with the given settings. This function will create a new listening socket, accept connections on it, and spawn a new thread for each connection.

Client

data ClientSettingsUnix Source #

Settings for a Unix domain sockets client.

Instances

Instances details
HasPath ClientSettingsUnix Source # 
Instance details

Defined in Data.Streaming.Network

HasReadBufferSize ClientSettingsUnix Source #

Since 0.1.14

Instance details

Defined in Data.Streaming.Network

runUnixClient :: ClientSettingsUnix -> (AppDataUnix -> IO a) -> IO a Source #

Run an Application by connecting to the specified server.

Getters

Setters

setPath :: HasPath a => FilePath -> a -> a Source #

setAfterBind :: HasAfterBind a => (Socket -> IO ()) -> a -> a Source #