Expand description
§tokio-unix-ipc
This crate implements a minimal abstraction over UNIX domain sockets for the purpose of IPC on top of tokio. It lets you send both file handles and rust objects between processes. This is a replacement for my earlier unix-ipc crate.
§How it works
This uses serde to serialize data over unix sockets
via bincode. Thanks to the
Handle
abstraction you can also send any object
across that is convertable into a unix file handle.
The way this works under the hood is that during serialization and deserialization encountered file descriptors are tracked. They are then sent over the unix socket separately. This lets unassociated processes share file handles.
If you only want the unix socket abstraction you can disable all default features and use the raw channels.
§Features
serde
: enables support for the non raw typesserde-structural
: enables support for structural data passingbootstrap
: adds support for boostrappingpanic-support
: adds support for IPC panic catchingbacktrace
: adds support for backtraces to panics
Modules§
- panic
- Support for cross-process panic handling.
- serde
- This module provides extensions to serde for IPC.
Structs§
- Bootstrapper
- A bootstrap helper.
- Credentials
- Data received via
SCM_CREDENTIALS
from a remote process. - RawReceiver
- An async raw receiver.
- RawSender
- An async raw sender.
- Receiver
- A typed receiver.
- Sender
- A typed sender.
Functions§
- channel
- Creates a typed connected channel.
- channel_
from_ std - Creates a typed connected channel from an already extant socket.
- raw_
channel - Creates a raw connected channel.
- raw_
channel_ from_ std - Creates a raw connected channel from an already extant socket.
- symmetric_
channel - Creates a typed connected channel where the same type is both sent and received.