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 docs/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 is the thin layer that actually owns a TcpStream, reads whatever bytes are available, feeds them 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.

Structs§

AsyncRtmpServer
A tokio::net::TcpListener that accepts inbound RTMP publishers and hands back a driven RtmpConnection per connection.
RtmpConnection
One accepted RTMP connection: a TcpStream driving a ServerSession.