conduit-extra-1.3.1.1: Batteries included conduit: adapters for common libraries.

Safe HaskellNone
LanguageHaskell98

Data.Conduit.Network.Unix

Contents

Synopsis

Basic utilities

sourceSocket :: 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 :: 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 #

The data passed to a Unix domain sockets Application.

Instances
HasReadWrite AppDataUnix 
Instance details

Defined in Data.Streaming.Network

Methods

readLens :: Functor f => (IO ByteString -> f (IO ByteString)) -> AppDataUnix -> f AppDataUnix #

writeLens :: Functor f => ((ByteString -> IO ()) -> f (ByteString -> IO ())) -> AppDataUnix -> f AppDataUnix #

Server

data ServerSettingsUnix #

Settings for a Unix domain sockets server.

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

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 #

Settings for a Unix domain sockets client.

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

Run an Application by connecting to the specified server.

Getters

getPath :: HasPath a => a -> FilePath #

getAfterBind :: HasAfterBind a => a -> Socket -> IO () #

Setters

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

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