Safe Haskell | None |
---|---|
Language | Haskell2010 |
Socket.Stream.Interruptible.Addr
Synopsis
- send :: TVar Bool -> Connection -> Addr -> Int -> IO (Either (SendException Interruptible) ())
- receiveExactly :: TVar Bool -> Connection -> Addr -> Int -> IO (Either (ReceiveException Interruptible) ())
- receiveOnce :: TVar Bool -> Connection -> Addr -> Int -> IO (Either (ReceiveException Interruptible) Int)
- receiveBetween :: TVar Bool -> Connection -> Addr -> Int -> Int -> IO (Either (ReceiveException Interruptible) Int)
Documentation
Arguments
:: TVar Bool | Interrupt. On |
-> Connection | Connection |
-> Addr | Start of buffer |
-> Int | Number of bytes to send |
-> IO (Either (SendException Interruptible) ()) |
Send an exact number of bytes starting from a given address. If needed,
this calls POSIX send
repeatedly until the requested number of bytes
has been sent.
Arguments
:: TVar Bool | Interrupt. On |
-> Connection | Connection |
-> Addr | Start of buffer |
-> Int | Exact number of bytes to receive |
-> IO (Either (ReceiveException Interruptible) ()) |
Receive the requested number of bytes into memory beginning at
the specified address. If needed, this may call recv
repeatedly until
the requested number of bytes have been received.
Arguments
:: TVar Bool | Interrupt. On |
-> Connection | Connection |
-> Addr | Start of buffer |
-> Int | Maximum number of bytes to receive |
-> IO (Either (ReceiveException Interruptible) Int) |
Receive at most the specified number of bytes. This
only makes multiple calls to POSIX recv
if EAGAIN is returned. It makes at
most one recv
call that successfully fills the buffer.
Arguments
:: TVar Bool | Interrupt. On |
-> Connection | Connection |
-> Addr | Start of buffer |
-> Int | Minimum number of bytes to receive |
-> Int | Maximum number of bytes to receive |
-> IO (Either (ReceiveException Interruptible) Int) |
Receive a number of bytes that is between the inclusive lower and
upper bounds. If needed, this may call recv
repeatedly until the
minimum requested number of bytes have been received.