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

Safe HaskellNone
LanguageHaskell2010

Network.Connection.Conduit

Contents

Description

A conduit source and sink based on Network.Connection from the connection package, and ResourceT 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 connectFromHandle.