io_socketpair(3)

io_socketpair3

Create a pair of sockets

Usage

#include <libowfat/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

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–11
  2. 12–13

From libowfat-dev 0.32-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.