Skip to main content

Module message

Module message 

Source
Expand description

RTMP message assembly from chunks, protocol control messages, and the message type catalogue (Adobe RTMP 1.0 §5.4, §6, §7.1).

See private/specs-verified/rtmp/rtmp-runtime/rtmp.md §4 (Protocol Control Messages), §5 (RTMP Message Format + User Control, §6.1/§6.2), and §6 (RTMP Message Types, §7.1) for the wire layout.

This module adds typed interpretation on top of the crate::chunk::Message carrier: the message type id (crate::chunk::Message::message_type_id, a MessageTypeId), the Chunk-Stream-layer protocol control messages (ProtocolControl, §4/§5.4), and the streaming-layer user control events (UserControl, §5.3/§6.2/§6.7).

Structs§

ChunkSize
A validated RTMP chunk size (§5.4.1): 1..=0x7FFF_FFFF.

Enums§

LimitType
Set Peer Bandwidth’s Limit Type byte (§5.4.5).
MessageTypeId
RTMP message type id (§6, RTMP Message Types §7.1; the Message Type ID field of the chunk message header, §5.3.1). Ids 1..=6 are Chunk-Stream-layer protocol control (§5.4); the rest are streaming-layer message types (§6/§7.1). A value §7.1 does not define is kept in MessageTypeId::Other, since a peer may send one and the payload is still carried.
ProtocolControl
A Chunk-Stream-layer protocol control message (§4, spec §5.4): message type ids 1, 2, 3, 5, 6. MUST use message stream id 0 and chunk stream id 2 (CONTROL_MESSAGE_STREAM_ID / CONTROL_CHUNK_STREAM_ID); effective immediately on receipt.
UserControl
A User Control Message event (§5.3, message type id 4; event-data formats per §6.7, spec §7.1.7). SHOULD use message stream id 0 and, over the chunk stream, csid 2. Effective on receipt; timestamps ignored.

Constants§

CONTROL_CHUNK_STREAM_ID
Chunk stream id protocol control messages and user control messages MUST/SHOULD be sent on (§4, §5.3).
CONTROL_MESSAGE_STREAM_ID
Message stream id protocol control messages MUST use, and user control messages SHOULD use (§4, §5.3): the control stream.