1io_socketpair(3) Library Functions Manual io_socketpair(3)
2
3
4
6 io_socketpair - create a pair of sockets
7
9 #include <io.h>
10
11 int io_socketpair(int64 pfd[2]);
12
14 io_socketpair creates a new UNIX socket pair and writes both descrip‐
15 tors to d. The socket pair works much like a pipe, but it is bidirec‐
16 tional (i.e. both descriptors are for reading and writing).
17
18 io_socketpair returns 1 to indicate success. If something goes wrong,
19 io_socketpair returns 0, setting errno to indicate the error; in this
20 case it frees any memory that it allocated for the new socketpair, and
21 it leaves d alone.
22
24 io_readfile(3), io_createfile(3), io_pipe(3)
25
26
27
28 io_socketpair(3)