![]() |
![]() |
![]() |
Create a pair of connected sockets
#include <sys/types.h> #include <sys/socket.h> int socketpair( int d, int type, int protocol, int * sv );
libsocket
The socketpair() call creates an unnamed pair of connected sockets in the specified domain d, of the specified type, 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.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
![]() |
![]() |
![]() |