Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
send :: Socket -> Bytes -> IO (Either Errno ()) Source #
Send the entire byte sequence. This call POSIX send
in a loop
until all of the bytes have been sent.
If this is passed the empty byte sequence, it doesn't actually call
POSIX send()
. It just returns that it succeeded.
sendInterruptible :: TVar Bool -> Socket -> Bytes -> IO (Either Errno ()) Source #
Variant of send
that fails with EAGAIN
if the interrupt ever becomes true.
If this returns zero bytes, it means that the peer has performed an orderly shutdown.