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.
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.
The existence of a constructor does not necessarily imply that that socket type is supported on your system: see isSupportedSocketType.
Deprecated alias for bind.
Get a socket option that gives an Int value. There is currently no API to get e.g. the timeval socket options
Does the SOCK_ constant corresponding to the given SocketType exist on this system?
0, used in getAddrInfo hints, for example
Show more results