Safe Haskell | None |
---|---|
Language | Haskell2010 |
A conduit
source and sink based on Network.Connection from the
connection
package, and ResourceT aware constructors.
- sourceConnection :: MonadIO m => Connection -> Producer m ByteString
- sinkConnection :: MonadIO m => Connection -> Consumer ByteString m ()
- connectFromHandle :: MonadResource m => ConnectionContext -> Handle -> ConnectionParams -> m Connection
- connectTo :: MonadResource m => ConnectionContext -> ConnectionParams -> m Connection
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
.
connectTo :: MonadResource m => ConnectionContext -> ConnectionParams -> m Connection Source
Create a new connection. See connectTo
.