Crate mm_protocol

Source

Re-exports§

pub use messages::*;

Modules§

messages

Enums§

MessageType
A protocol message.
ProtocolError

Constants§

ALPN_PROTOCOL_VERSION
The current protocol version.
MAX_MESSAGE_SIZE
The maximum size of a single message. Note that a lower limit may apply to messages sent as datagrams, based on the connection MTU and QUIC’s overhead.

Functions§

decode_message
Reads a header-prefixed message from a byte slice, and returns the number of bytes consumed. Returns ProtocolError::ShortBuffer if the buffer contains a partial message.
encode_message
Writes a header-prefixed message to a byte slice, and returns the number of bytes used. Returns ProtocolError::ShortBuffer if the slice doesn’t have enough capacity.