Expand description
Length-prefixed local-stream framing for later named-pipe / UDS backends.
No OS handles. windows.rs and unix.rs implement StreamBytes and wrap
FramedStream. Profile is existing BearerProfile::LocalIpcV1.
Structs§
- Framed
Stream - Connected length-prefixed stream. Partial writes stay in
WriteCursor. - Read
Cursor - Partial-read assembly. Oversize length poisons the cursor; a short
outafter a complete frame isQdnfError::Capacityand does not drop it. - Unix
IpcListener - Parent-owned Unix listener. Generates a private temp dir and socket path.
- Unix
Stream Bytes - Non-blocking Unix stream. Implements
StreamBytesforFramedStream. - Write
Cursor - Sealed pending write. WouldBlock retains the exact wire bytes;
offadvances only by accepted sink bytes.
Constants§
- FRAME_
CAP - Maximum payload bytes. Same value as in-process
ipc.rsFRAME_CAP. - LEN_
SIZE - Big-endian length prefix.
- SOCKET_
FILE - Socket file name under the parent-owned temp directory.
- WIRE_
CAP - Maximum sealed wire bytes (
LEN_SIZE + FRAME_CAP).
Traits§
- Stream
Bytes - Non-blocking byte pipe. Named-pipe and UDS adapters implement this.
Ok(n)is accepted bytes; cursors advance only by thatn.
Functions§
- decode_
stream_ frame - Decode one frame. Extra bytes after the declared length are trailing
(
QdnfError::Malformed). - encode_
stream_ frame - Encode
payloadasu32be(len) || payloadintoout. - next_
stream_ frame - Decode one frame; leftover bytes after
consumedare for the caller.