pub enum MessageStreamKind {
Control,
NetStream(u32),
Reserved(u32),
}Expand description
Typed classification of a message’s msg_stream_id per Message
Formats spec §5 (“Protocol Control Messages MUST have message
stream ID 0 (called as control stream)”) and §4.1 (3-byte stream
ID field).
The numeric NetStream ids 1..=0x00FF_FFFF are the values a server
returns from _result(createStream); per the RTMP Commands Messages
spec §4.1.3 a freshly created NetStream receives “a stream ID” that
the publisher then stamps into every subsequent A/V / metadata
message header. The chunk message-stream-id field on the wire is
32-bit little-endian (RTMP Chunk Stream §6.1.2.1) but the §4.1
message header layout only allocates 3 bytes for it; values whose
top byte is non-zero are reserved and surface here as
MessageStreamKind::Reserved so a caller can refuse them.
Variants§
Control
msg_stream_id == 0 — the “control stream” carrying
NetConnection commands (connect, createStream, _result,
_error, call) and the protocol-control / user-control
messages (types 1..=6).
NetStream(u32)
A NetStream handle (1..=0x00FF_FFFF) — the value returned by
_result(createStream), stamped into every audio / video /
data / aggregate message that flows on that NetStream.
Reserved(u32)
msg_stream_id has bit(s) set in the top byte, outside the
§4.1 3-byte field. RTMP Chunk Stream §6.1.2.1 carries the
field as a 32-bit value so receivers see it on the wire, but
the Message Formats spec §4.1 reserves the high byte. Surfaced
so a strict consumer can refuse the message.
Trait Implementations§
Source§impl Clone for MessageStreamKind
impl Clone for MessageStreamKind
Source§fn clone(&self) -> MessageStreamKind
fn clone(&self) -> MessageStreamKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MessageStreamKind
Source§impl Debug for MessageStreamKind
impl Debug for MessageStreamKind
impl Eq for MessageStreamKind
Source§impl PartialEq for MessageStreamKind
impl PartialEq for MessageStreamKind
Source§fn eq(&self, other: &MessageStreamKind) -> bool
fn eq(&self, other: &MessageStreamKind) -> bool
self and other values to be equal, and is used by ==.