| manpages.info - online man pages | ![]() |
|||
|
socketpair (2) Table of Contents
Namesocketpair - create a pair of connected sockets
Synopsis
#include <sys/types.h>
int
DescriptionThe socketpair() call creates an unnamed pair of connected sockets in the specified domain d, of the specified type, and using the optionally specified protocol. The descriptors used in referencing the new sockets are returned in sv[0] and sv[1]. The two sockets are indistinguishable.
DiagnosticsA 0 is returned if the call succeeds, -1 if it fails.
ErrorsThe call succeeds unless:
[EPROTONOSUPPORT] The specified protocol is not supported on this machine.
See Also
BugsThis call is currently implemented only for the UNIX domain.
HistoryThe socketpair() function call appeared in 4.2BSD.
|