Skip to main content

Module client

Module client 

Source
Expand description

RTMP client session engine — connect → createStream → publish (Adobe RTMP 1.0 §7.2, NetConnection/NetStream commands).

ClientSession mirrors crate::server::ServerSession: a sans-IO state machine for the client publish role. Feed inbound bytes via ClientSession::handle_data, get back outbound bytes + typed ClientEvents. Auto-advances: a successful connect _result automatically emits createStream, and a successful createStream _result emits publish.

§Damage reports

As on the server side (see crate::server’s module docs for the list), everything this session skips is published as ClientEvent::Damage: an interrupted or aborted message, an over-limit message consumed without being held, media on a stream id the server never allocated, a message type or command this engine does not decode, an AMF0 ECMA-Array count that disagrees with its contents, and (through the tokio adapter) input that ends inside a message. The caller’s RtmpClientConfig::damage_policy decides whether a report also ends the session (RtmpError::Damage).

Structs§

ClientLimits
The bounds a ClientSession holds its peer to. The crate supplies none of them.
ClientSession
Sans-IO RTMP client publish session.
RtmpClientConfig
Configuration for a ClientSession.

Enums§

ClientEvent
Typed events ClientSession::handle_data surfaces.
ClientMode
What a ClientSession does after connect and createStream.