Expand description
Client-side RTSP session engine — RFC 2326 Appendix A.1.
ClientSession is a sans-IO driver: request-builder methods return the
outbound bytes to send, and ClientSession::handle_data consumes inbound
bytes (responses and interleaved $ frames) and returns typed
ClientEvents. It holds the session state, the next CSeq, the negotiated
Session id and timeout, optional credentials, and the digest
Authenticator.
Behaviour implemented here (see docs/state-machines.md,
docs/methods-and-status.md,
docs/auth.md):
- Request builders reject any method not valid in the current state
(
Error::MethodNotValidInState) before emitting bytes. - Every request carries an incrementing
CSeq, theSessionid once known, and (once authenticated) a freshly-computedAuthorizationheader. - A
2xxresponse advances the state per the §A.1 table; a3xxresets it toInit. - A
401with configured credentials transparently re-sends the request withAuthorization(a newCSeq), including onstale=true. - The
Sessionid and timeout are captured from the SETUP response. - Interleaved frames are surfaced as
ClientEvent::MediaData.
Structs§
- Client
Session - A driveable RTSP client session (RFC 2326 §A.1).
Enums§
- Client
Event - An event produced by
ClientSession::handle_data.