Skip to main content

Module protocol

Module protocol 

Source
Expand description

The wire protocol (no networking): message types generated from proto/dspk_stream.proto, length-prefixed framing, and conversions to and from dspk-core / dspk-view types.

See the .proto file for the session layout (control, signal and view streams).

Re-exports§

pub use codec::read_message;
pub use codec::write_message;
pub use convert::decode_signal;
pub use convert::envelope_from_frame;
pub use convert::frame_from_envelope;
pub use convert::header_from_info;
pub use convert::info_from_header;
pub use convert::request_from_view;
pub use convert::view_from_request;

Modules§

codec
Length-prefixed messages on QUIC streams: a LENGTH_PREFIX_BYTES-byte big-endian length, then the protobuf encoding.
convert
Conversions between wire messages and dspk-core / dspk-view types. Values are exact: rates and times travel as fractions, samples as stored.
wire
Messages generated from proto/dspk_stream.proto (package dspk_stream.v1).

Constants§

ALPN
TLS application protocol (ALPN): names the protocol and its version, so QUIC refuses peers speaking another one before any message is exchanged.
DEFAULT_MAX_MESSAGE_BYTES
Default upper bound on one encoded message (64 MiB); larger lengths are rejected before allocating.
LENGTH_PREFIX_BYTES
Bytes of the big-endian length before every message.
PROTOCOL_VERSION
Protocol version sent in ClientHello and ServerInfo; peers of another version are refused.