Go to the previous, next section.
int socketpair(int domain, int type, int protocol,
int sv[2]);
domain: [in] the socket protocol family.
type: [in] the socket type.
protocol: [in] the socket protocol.
sv: [out] the two file descriptors.
Creates a pair of interconnected sockets. The two sockets are
indistinguishable. See socket
for more information on domains,
types and protocols. See section socket
Linux 1.0 supports only the AF_UNIX
domain for this call.
On success, zero is returned. On error, -1 is returned and errno
is set to one of the following values:
EACCESS
: the calling task does not have permission to
create a socket of the specified domain, type and protocol.
EPROTONOSUPPORT
, EAFNOSUPPORT
, EOPNOSUPPORT
,
EMFILE
, ENFILE
, EFAULT
or ENOBUFFS
.
Go to the previous, next section.