socketpair() | |
---|---|
create a pair of connected sockets | |
#include 'sys/socket.h' #include 'sys/type.h' int socketpair ( int domain, int type, int protocol, int sv[2] ); |
The socketpair() call creates an unnamed pair of connected sockets in the specified domain, of the specified type, and using the optionally specified protocol. For further details of these arguments, see socket().
On success, 0 is returned, on error, -1 is returned, and errno is set approprately