Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Network.Unexceptional.MutableBytes
Contents
Description
sockets convert a reception length of zero to an non-standard EOI
error
code. Datagram reception functions do not do this.
Synopsis
- receive :: Socket -> MutableBytes RealWorld -> IO (Either Errno Int)
- receiveInterruptible :: TVar Bool -> Socket -> MutableBytes RealWorld -> IO (Either Errno Int)
- receiveExactly :: Socket -> MutableBytes RealWorld -> IO (Either Errno ())
- receiveExactlyInterruptible :: TVar Bool -> Socket -> MutableBytes RealWorld -> IO (Either Errno ())
- receiveFromInterruptible :: TVar Bool -> Socket -> MutableBytes RealWorld -> IO (Either Errno (Int, SockAddr))
Stream Sockets
Receive bytes from a socket. Receives at most N bytes, where N is the size of the buffer. Returns the number of bytes that were actually received.
Arguments
:: Socket | |
-> MutableBytes RealWorld | Length is the exact number of bytes to receive, must be greater than zero. |
-> IO (Either Errno ()) |
Blocks until an exact number of bytes has been received.