socketpair - create a pair of connected sockets

The call creates an unnamed pair of connected sockets in the specified domain of the specified and using the optionally specified The descriptors used in referencing the new sockets are returned in and The two sockets are indistinguishable. On success, zero is returned. On error, -1 is returned, and is set appropriately. Too many descriptors are in use by this process. The specified address family is not supported on this machine. The specified protocol is not supported on this machine. The specified protocol does not support creation of socket pairs. The address does not specify a valid part of the process address space.

HISTORY
The function call appeared in BSD 4.2. This call is currently implemented only for the domain. [Documenter's note: is this true for Linux?]