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

Network.Unexceptional.ByteString

Synopsis

Documentation

send :: Socket -> ByteString -> IO (Either Errno ()) Source #

Send the entire byte sequence. This call POSIX send in a loop until all of the bytes have been sent.

sendInterruptible :: TVar Bool -> Socket -> ByteString -> IO (Either Errno ()) Source #

Send the entire byte sequence. This call POSIX send in a loop until all of the bytes have been sent.

receive Source #

Arguments

:: Socket 
-> Int

Maximum number of bytes to receive

-> IO (Either Errno ByteString) 

If this returns zero bytes, it means that the peer has performed an orderly shutdown.

receiveExactly Source #

Arguments

:: Socket 
-> Int

Exact number of bytes to receive, must be greater than zero

-> IO (Either Errno ByteString) 

Blocks until an exact number of bytes has been received.

receiveExactlyInterruptible Source #

Arguments

:: TVar Bool 
-> Socket 
-> Int

Exact number of bytes to receive, must be greater than zero

-> IO (Either Errno ByteString) 

Blocks until an exact number of bytes has been received.