socket +network
The Network.Socket module is for when you want full control over sockets. Essentially the entire C socket API is exposed through this module; in general the operations follow the behaviour of the C functions of the same name (consult your favourite Unix networking book).
A higher level interface to networking operations is provided through the module Network.
Create a new socket using the given address family, socket type and protocol number. The address family is usually AF_INET, AF_INET6, or AF_UNIX. The socket type is usually Stream or Datagram. The protocol number is usually defaultProtocol. If AF_INET6 is used, the IPv6Only socket option is set to 0 so that both IPv4 and IPv6 can be handled with one socket.
Build a pair of connected socket objects using the given address family, socket type, and protocol number. Address family, socket type, and protocol number are as for the socket function above. Availability: Unix.
Returns the PortID associated with a given socket.
Socket Types.
This data type might have different constructors depending on what is supported by the operating system.
Bind the socket to an address. The socket must not already be bound. The Family passed to bindSocket must be the same as that passed to socket. If the special port number aNY_PORT is passed then the system assigns the next available use port.
Show more results