-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Enumerators for network sockets -- -- Enumerators for network sockets @package network-enumerator @version 0.1.2 module Network.Socket.Enumerator -- | Enumerate binary data from a Socket, using recv. The -- socket must be connected. -- -- The buffer size should be a small power of 2, such as 4096. enumSocket :: MonadIO m => Integer -> Socket -> Enumerator ByteString m b -- | Enumerate binary data from a Socket, using recvFrom. The -- socket does not have to be connected. Each chunk of data received will -- be paired with its address. enumSocketFrom :: MonadIO m => Integer -> Socket -> Enumerator (ByteString, SockAddr) m b -- | Enumerate binary data from a Socket, using recv. The -- socket must be connected. -- -- The buffer size should be a small power of 2, such as 4096. -- -- If any call to recv takes longer than the timeout, -- enumSocketTimed will throw an error. To add a timeout for the -- entire session, wrap the call to run in timeout. -- -- Since: 0.1.2 enumSocketTimed :: MonadIO m => Integer -> Integer -> Socket -> Enumerator ByteString m b -- | Write data to a Socket, using sendMany. The socket must -- be connected. iterSocket :: MonadIO m => Socket -> Iteratee ByteString m () -- | Write data to a Socket, using sendManyTo. The socket -- does not have to be connected. iterSocketTo :: MonadIO m => Socket -> SockAddr -> Iteratee ByteString m () -- | Write data to a Socket, using sendMany. The socket must -- be connected. -- -- If any call to sendMany takes longer than the timeout, -- iterSocketTimed will throw an error. To add a timeout for the -- entire session, wrap the call to run in timeout. -- -- Since: 0.1.2 iterSocketTimed :: MonadIO m => Integer -> Socket -> Iteratee ByteString m ()