This module provides an API for the socket interface. It is used to create, delete and manipulate sockets.
Accept a connection on a socket.
This call is used with connection-based socket types (stream or seqpacket). It extracs the first pending connection request for the listen socket and returns the (newly) connected socket.
Bind a name to a socket.
When a socket is created
(with
The rules used for name binding vary between domains.
Closes the socket.
This function connects the socket to the address
specied by the
Get an option on a socket.
What properties are valid depend on what kind of socket
it is (
When specifying
Not all options are valid on all platforms. That is, even if "we" support an option, that does not mean that the underlying OS does.
Listen for connections on a socket.
Creates an endpoint (socket) for communication.
For some types there is a default protocol, which will be used if no protocol is specified:
Receive a message from a socket.
There is a special case for the argument
Receive a message from a socket.
This function reads "messages", which means that regardless of how much we want to read, it returns when we get a message.
The
It may be impossible to know what (buffer) size is appropriate "in advance", and in those cases it may be convenient to use the (recv) 'peek' flag. When this flag is provided the message is *not* "consumed" from the underlying buffers, so another recvfrom call is needed, possibly with a then adjusted buffer size.
Send a message on a connected socket.
Send a message on a socket, to the specified destination.
Set options on a socket.
What properties are valid depend on what kind of socket
it is (
Not all options are valid on all platforms. That is, even if "we" support an option, that does not mean that the underlying OS does.
Sockets are set 'non-blocking' when created, so this option is *not* available (as it would adversely effect the Erlang VM to set a socket 'blocking').
Shut down all or part of a full-duplex connection.