3 socketpair \- creates a pair of connected sockets.
6 #include <sys/socket.h>
10 int socketpair(int \fIdomain\fP, int \fItype\fP, int \fIprotocol\fP, int \fIsv[2]\fP);
14 socketpair() creates two connected sockets of the specified \fItype\fP
15 in the specified \fIdomain\fP using the specified \fIprotocol\fP and
16 stores the two resulting socket descriptors in \fIsv[2]\fP.
18 On success, this function returns 0, and \fIsv[2]\fP is set to the two
19 newly created socket descriptors. On error, -1 is returned and
24 The \fIdomain\fP is not supported.
27 The \fIprotocol\fP is not supported by the \fIdomain\fP.
30 The \fIprotocol\fP is not supported by the \fItype\fP.
33 The pair of sockets aren't in a valid state or are not connection oriented sockets.
36 The user ID, group ID, and process ID of the first socket doesn't match that of the second.
38 This function is only implemented for unix domain sockets. Therefore,
39 the only valid value for \fIdomain\fP is
45 This function first appeared in Minix 3.1.8.