Safe Haskell | Safe-Inferred |
---|
Network.HTTP.Toolkit.Connection
- data Connection = Connection {
- _read :: IO ByteString
- _unread :: ByteString -> IO ()
- makeConnection :: IO ByteString -> IO Connection
- connectionFromHandle :: Handle -> IO Connection
- connectionRead :: Connection -> IO ByteString
- connectionUnread :: Connection -> ByteString -> IO ()
- connectionReadAtLeast :: Connection -> Int -> IO ByteString
Documentation
data Connection Source
An abstract connection type that allows to read and unread input.
Constructors
Connection | |
Fields
|
makeConnection :: IO ByteString -> IO ConnectionSource
Create a Connection
from provided IO
action.
connectionFromHandle :: Handle -> IO ConnectionSource
Create a Connection
from provided Handle
.
connectionRead :: Connection -> IO ByteStringSource
Read some input.
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.