Module ipc

Module ipc 

Source
Expand description

Platform-agnostic IPC transport for the NDN management socket.

Abstracts over Unix domain sockets (Linux / macOS) and Windows Named Pipes so that MgmtClient, run_face_listener, and ndn-ctl compile and run on all three platforms without conditional-compilation scaffolding at each call site.

§Face type

IpcFace uses boxed trait objects for the read / write halves so the concrete type is identical on every platform:

IpcFace = StreamFace<
    Box<dyn AsyncRead + Send + Unpin>,
    Box<dyn AsyncWrite + Send + Unpin>,
    TlvCodec,
>

The boxing overhead is negligible for management traffic.

§Default socket paths

PlatformDefault path
Unix/run/ndn/mgmt.sock (or /tmp/ndn.sock in dev)
Windows\\.\pipe\ndn

Structs§

IpcListener
Listens for IPC connections on the management socket path.

Functions§

ipc_face_connect
Connect to the IPC socket at path and return an IpcFace.

Type Aliases§

IpcFace
Platform-agnostic NDN face over the management IPC socket.