conduit-connection-0.1.0.3: Conduit source and sink for Network.Connection.

Safe HaskellNone
LanguageHaskell2010

Network.Connection.Conduit

Contents

Description

A conduit source and sink based on Network.Connection, and Control.Monad.Trans.Resource aware constructors.

Synopsis

Source and sink

sourceConnection :: MonadIO m => Connection -> Producer m ByteString Source #

Stream the data from the connection. This does not close the connection on completion

sinkConnection :: MonadIO m => Connection -> Consumer ByteString m () Source #

Stream all incoming data to the connection. This does not close the connection on completion.

ResourceT aware constructors

connectFromHandle :: MonadResource m => ConnectionContext -> Handle -> ConnectionParams -> m Connection Source #

Create a new connection from a handle. See "Network.Connection.connectFromHandle".

connectTo :: MonadResource m => ConnectionContext -> ConnectionParams -> m Connection Source #

Create a new connection. See "Network.Connection.connectTo".