Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- send :: TVar Bool -> Connection -> MutableBytes RealWorld -> IO (Either (SendException Interruptible) ())
- sendOnce :: TVar Bool -> Connection -> MutableBytes RealWorld -> IO (Either (SendException Interruptible) Int)
- receiveExactly :: TVar Bool -> Connection -> MutableBytes RealWorld -> IO (Either (ReceiveException Interruptible) ())
- receiveOnce :: TVar Bool -> Connection -> MutableBytes RealWorld -> IO (Either (ReceiveException Interruptible) Int)
- receiveBetween :: TVar Bool -> Connection -> MutableBytes RealWorld -> Int -> IO (Either (ReceiveException Interruptible) Int)
Documentation
:: TVar Bool | Interrupt. On |
-> Connection | Connection |
-> MutableBytes RealWorld | Slice of a buffer |
-> IO (Either (SendException Interruptible) ()) |
Send a slice of a buffer. If needed, this calls POSIX send
repeatedly
until the entire contents of the buffer slice have been sent.
:: TVar Bool | Interrupt. On |
-> Connection | Connection |
-> MutableBytes RealWorld | Slice of a buffer |
-> IO (Either (SendException Interruptible) Int) |
Send as much of the buffer slice as there is space for in the TCP send buffer. Returns the number of bytes sent.
:: TVar Bool | Interrupt. On |
-> Connection | Connection |
-> MutableBytes RealWorld | Slice of a buffer |
-> IO (Either (ReceiveException Interruptible) ()) |
Receive a number of bytes exactly equal to the length of the
buffer slice. If needed, this may call recv
repeatedly until
the requested number of bytes have been received.
:: TVar Bool | Interrupt. On |
-> Connection | Connection |
-> MutableBytes RealWorld | Slice of a buffer |
-> IO (Either (ReceiveException Interruptible) Int) |
Receive a number of bytes exactly equal to the length of the slice. This
only makes multiple calls to POSIX recv
if EAGAIN is returned. It makes at
most one recv
call that successfully fills the buffer.
:: TVar Bool | Interrupt. On |
-> Connection | Connection |
-> MutableBytes RealWorld | Slice of a buffer |
-> Int | Minimum number of bytes to receive, must be less than or equal to the length of the slice. |
-> IO (Either (ReceiveException Interruptible) Int) |
Receive a number of bytes that is at least the minimum size
and is at most the length of the slice. If needed, this may
call recv
repeatedly until the minimum requested number of
bytes have been received.