Skip to main content

Crate snapcast_proto

Crate snapcast_proto 

Source
Expand description

Snapcast binary protocol implementation.

This crate implements the Snapcast binary wire protocol, providing serialization and deserialization for all message types exchanged between snapclient and snapserver.

§Protocol Overview

Every message consists of a BaseMessage header followed by a typed payload. All multi-byte integers are little-endian.

See the protocol documentation for the full specification.

Re-exports§

pub use message::MessageType;
pub use message::base::BaseMessage;
pub use message::base::ProtoError;
pub use sample_format::SampleFormat;
pub use types::Timeval;

Modules§

message
Protocol message types.
sample_format
Audio sample format description.
status
Snapcast status types matching the JSON-RPC wire format.
types
Shared types used across the protocol.

Constants§

DEFAULT_CONTROL_PORT
Default TCP port for JSON-RPC control.
DEFAULT_ENCRYPTION_PSK
Default pre-shared key for f32lz4e (encrypted f32lz4) codec.
DEFAULT_HTTP_PORT
Default HTTP port for JSON-RPC + Snapweb.
DEFAULT_SAMPLE_FORMAT
Default sample format: 48000 Hz, 16-bit, stereo.
DEFAULT_STREAM_PORT
Default TCP port for binary protocol (streaming clients).
DEFAULT_WSS_PORT
Default WebSocket Secure port.
PROTOCOL_VERSION
Snapcast binary protocol version.