io_socketpair(3diet)

io_socketpair3diet

Create a pair of sockets

Usage

#include <io.h>

int io_socketpair(int64 pfd[2]);

Overview

io_socketpair creates a new UNIX socket pair and writes both descriptors to d. The socket pair works much like a pipe, but it is bidirectional (i.e. both descriptors are for reading and writing).

io_socketpair returns 1 to indicate success. If something goes wrong, io_socketpair returns 0, setting errno to indicate the error; in this case it frees any memory that it allocated for the new socketpair, and it leaves d alone.

Releases

Unchanged in 4 releases since Debian 3.1 (Sarge).

  1. 3.1–6.0

From libowfat-dev 0.28-2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.