Module shm

Module shm 

Source
Expand description

Shared-memory NDN faces.

The spsc-shm feature (Unix only, enabled by default on Unix targets) provides a custom lock-free SPSC ring buffer in a POSIX shm_open region, with Unix datagram sockets for wakeup.

Both types expose the same pair of types: ShmFace (engine side) and ShmHandle (application side). The engine registers ShmFace via ForwarderEngine::add_face; the application uses ShmHandle to send and receive NDN packets over shared memory.

§Quick start

// ── Engine process ────────────────────────────────────────────────────────
let face = ShmFace::create(FaceId(5), "myapp").unwrap();
// engine.add_face(face, cancel);

// ── Application process ───────────────────────────────────────────────────
let handle = ShmHandle::connect("myapp").unwrap();
// handle.send(interest_bytes).await?;
// let data = handle.recv().await?;

Modules§

spsc
Custom SPSC shared-memory face (Unix only, spsc-shm feature).

Enums§

ShmError

Type Aliases§

ShmFace
Engine-side SHM face — register with ForwarderEngine::add_face.
ShmHandle
Application-side SHM handle.