Module ipc

Source
Expand description

IPC (“inter-process communication”) abstractions used on Linux.

NOTE: the actual implementations may be portable to other OSes, e.g. “UNIX domain sockets” are definitely not Linux-only, but there may be other reasons to only need them on Linux such as macOS

Structs§

Channel
One endpoint of a bi-directional inter-process communication channel, capable of sending/receiving both raw bytes and UNIX file descriptors, encoded/decoded from/to the TX/RX types, with an ordering guarantee (messages will be received in the same order that they were sent).
InheritableChannel
A Channel<TX, RX> whose internal (UNIX domain socket) file descriptor will persist in all child proceses (except for those which explicitly close it), and which only provides conversions to/from file descriptors, and a way to disable inheritance (i.e. re-enabling CLOEXEC semantics on it).

Enums§

Never
Type with no values to make it impossible to send on a channel endpoint, or receive on its opposite counterpart, if that direction is unused.

Traits§

FixedSizeEncoding
Encoding/decoding functionality that relies on each message being encoded to a constant (and small) “packet” size, allowing the use of 1:1 sendmsg and recvmsg calls, i.e. removing the need for any kind of “packet framing” that a SOCK_STREAM needs to soundly handle receiving a message’s fds through multiple recvmsg calls.

Functions§

channel