Skip to main content

Module io

Module io 

Source
Available on crate feature tokio only.
Expand description

Async tokio socket adapter driving the sans-IO ingest server session over a real tokio::net::TcpStream — the Layer-2 adapter (see private/specs-verified/rtmp/rtmp-runtime/rtmp.md § Layer-2 adapter; mirrors the rtsp_runtime::io tokio adapter shape in this same workspace).

ServerSession never touches a socket: it turns inbound bytes into (reply bytes, [ServerEvent]s). This module owns the stream as a tokio_util::codec::Framed whose decoder feeds every inbound chunk to ServerSession::handle_data, writes the reply bytes back, and returns the events — no business logic beyond that plumbing.

ServerSession::handle_data buffers partial handshake/chunk input internally (see its doc comment), so unlike an RTSP or HTTP adapter this one does not need to detect message boundaries itself: any chunk size, split anywhere, is fine to feed straight through.

Every awaited IO is bounded by RtmpTimeouts (W1 SP1.3).

Structs§

AsyncRtmpClient
A publishing RTMP client over a stream (a TcpStream by default): the adapter for ClientSession, mirroring RtmpConnection. Every awaited IO is bounded by RtmpTimeouts.
AsyncRtmpServer
A tokio::net::TcpListener that accepts inbound RTMP publishers and hands back a driven RtmpConnection per connection.
RtmpConnection
One accepted RTMP connection: a stream (a TcpStream by default) driving a ServerSession.
RtmpTimeouts
Explicit bounds on every awaited IO of the RTMP adapters (W1 SP1.3): no wait is unbounded.