-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Fast and memory efficient low-level networking -- -- Faster and more memory efficient low-level socket functions using -- Data.ByteStrings instead of Strings. @package network-bytestring @version 0.1 -- | | A module for efficiently transmitting data over sockets. For -- detailed documentation consult your favorite POSIX socket reference. -- All functions communicate failures by converting the error number to -- an System.IO.IOError. -- -- This module is intended to be imported together with Network.Socket -- like so: -- --
--   import Network.Socket hiding (send, sendTo, recv, recvFrom)
--   import Network.Socket.ByteString
--   
module Network.Socket.ByteString -- | Transmit a message to another socket. The socket must be in a -- connected state so that the intended recipient is known. send :: Socket -> ByteString -> IO Int -- | Transmit a message to another socket. The recipient can be specified -- explicitly so the socket must not (but can be) in a connected state. sendTo :: Socket -> ByteString -> SockAddr -> IO Int -- | Receive a message from another socket. The socket must be in a -- connected state so that the intended recipient is known. Note that the -- length of the received data can be smaller than specified maximum -- length. If the message is longer than the specified length it may be -- discarded depending on the type of socket. May block until a message -- arrives. recv :: Socket -> Int -> IO ByteString -- | Similar to recv but can be used to receive data on a socket -- that is not connection-oriented. recvFrom :: Socket -> Int -> IO (ByteString, SockAddr)