http-kit-0.4.0: A low-level HTTP library

Safe HaskellSafe-Inferred

Network.HTTP.Toolkit.Connection

Synopsis

Documentation

data Connection Source

An abstract connection type that allows to read and unread input.

Constructors

Connection 

Fields

_read :: IO ByteString
 
_unread :: ByteString -> IO ()
 

makeConnection :: IO ByteString -> IO ConnectionSource

Create a Connection from provided IO action.

connectionUnread :: Connection -> ByteString -> IO ()Source

Push back some input. The pushed back input will be returned by a later call to connectionRead.

connectionReadAtLeast :: Connection -> Int -> IO ByteStringSource

Read at least the specified number of bytes from the input stream.