Table of Contents

Namespace DotBoxD.Services.Protocol

Classes

MessageFramer

Handles message framing for the DotBoxD protocol. Stream frame: [4 bytes: Total Length][4 bytes: MessageId][1 byte: MessageType][N bytes: Body]. For RPC messages the body is un-nested as [4 bytes: Envelope Length][E bytes: Envelope][P bytes: Payload], so the trailing payload can be handed to callers as a zero-copy slice of the frame buffer.

Structs

MessageFramer.FramedMessage

A framed message read from a stream by ReadMessageAsync(Stream, CancellationToken). Body is the message body only — the 9-byte frame header has already been stripped, unlike the full-frame payload an IRpcChannel.ReceiveAsync returns. The caller owns it and must dispose it.

RpcRequest

Represents an RPC request message. A struct so that framing a request does not heap-allocate the envelope on the client hot path; it is constructed, serialized, and read but never mutated after construction.

RpcResponse

Represents an RPC response message. A struct so that framing a response does not heap-allocate the envelope on the server hot path; it is constructed, serialized, and read but never mutated after construction.

RpcStreamHandle

Identifies a stream multiplexed over the current DotBoxD connection.

ServiceHandle

Wire payload returned by a service method whose declared return type is itself a [DotBoxDService] interface. Carries the opaque instance identifier the server allocated when the root method ran; the client wraps the handle in a generated sub-service proxy that uses the identifier on every subsequent call.

Enums

MessageType

Defines the types of messages in the DotBoxD protocol.

RpcStreamKind

Describes the wire format carried by a DotBoxD stream.