network-unexceptional-0.2.0.0: Network functions that do not throw exceptions
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Unexceptional.MutableBytes

Synopsis

Documentation

receive Source #

Arguments

:: Socket 
-> MutableBytes RealWorld

Slice of a buffer

-> IO (Either Errno Int) 

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.

receiveInterruptible Source #

Arguments

:: TVar Bool

Interrupt

-> Socket 
-> MutableBytes RealWorld

Slice of a buffer

-> IO (Either Errno Int) 

receiveExactly Source #

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.

receiveExactlyInterruptible Source #

Arguments

:: TVar Bool 
-> Socket 
-> MutableBytes RealWorld

Length is the exact number of bytes to receive, must be greater than zero.

-> IO (Either Errno ())