|
Network.Socket.ByteString | |
|
|
|
|
Description |
| 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
|
|
Synopsis |
|
|
|
|
Send a message on a socket
|
|
Functions used to transmit a message to another socket.
|
|
|
:: Socket | Bound/Connected socket.
| -> ByteString | Data to send.
| -> IO Int | Number of bytes sent.
| Transmit a message to another socket. The socket must be in a
connected state so that the intended recipient is known.
|
|
|
|
:: Socket | (Possibly) bound/connected socket.
| -> ByteString | Data to send.
| -> SockAddr | Recipient address.
| -> IO Int | Number of bytes sent.
| Transmit a message to another socket. The recipient can be
specified explicitly so the socket must not (but can be) in a
connected state.
|
|
|
Receive a message from a socket
|
|
Functions used to receive messages from a socket, and may be
used to receive data on a socket whether or not it is
connection-oriented.
|
|
|
:: Socket | Bound/connected socket.
| -> Int | | -> IO ByteString | | 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.
|
|
|
|
:: Socket | (Possibly) bound/connected socket.
| -> Int | Maximum number of bytes to receive.
| -> IO (ByteString, SockAddr) | Data received and sender address.
| Similar to recv but can be used to receive data on a socket
that is not connection-oriented.
|
|
|
Produced by Haddock version 2.4.2 |