link only.Expand description
One SRT connection as a sans-IO link: datagrams and the caller’s now in, datagrams to
send and delivered payloads out.
Link holds the whole per-connection conversation once the handshake has settled: the ARQ
receiver and sender, the TSBPD scheduler, the §6 payload cipher and KM Refresh, LiveCC pacing,
Keep-Alive and peer-idle timing, end-of-stream reporting, and DROPREQ/SHUTDOWN handling. It
never reads a clock and never touches a socket: every call takes now and leaves what must
go on the wire in Link::take_sent.
CallerLink is the caller role on top of it: the sans-IO CallerHandshake with its
retransmit period and budget, and the transition into a Link at the resolution. It serves
the tokio adapter (crate::io) and any embedded host that owns its own socket loop alike, so
the protocol has one implementation, not one per host.
SRT: draft-sharabayko-srt-01 (handshake 4.3, TSBPD 4.5, too-late drop 4.6, ARQ 4.8, encryption 6).
Structs§
- Caller
Link - The caller role: the HSv5 caller handshake, then the established
Link. - Caller
Params - What a
CallerLinkis configured by: the handshake this side advertises, the connection’s own Socket ID and initial sequence number, its time bounds, and what the link may assume about the stream it delivers. - Delivered
- What one call on a link delivered, in order.
- Link
- One established SRT connection, driven by datagrams and the caller’s clock.
- Link
Cadence - The protocol cadence a link keeps, every period chosen by the caller (libsrt’s values are a 250 ms handshake retransmit, a 1 s keep-alive; the rest are this crate’s own choices).
- Link
Counts - What a link has counted about the DATA it received, one total per kind, for a host that keeps statistics.
- Link
Setup - What settled a connection: its negotiated parameters and the peer’s own handshake values.
- Link
Timers - Every time bound a link needs, all chosen by the caller.
- Payload
- One delivered application payload, held in the datagram it arrived in: the bytes from
Payload::starton. A host that hands payloads on as shared buffers takes the datagram and the offset withPayload::into_partsand slices it, without a copy.
Enums§
- Delivered
Item - One item a link hands its host, in the order the stream needs it.
- LinkEnd
- How a link ended, named once.
Constants§
- KEY_LEN
- Width of a derived value: a SHA-256 digest, and the seed the tokio adapter gives it.
- MIN_
WAKE - Floor on how soon
Link::next_deadlinemay ask to be woken: never a deadline in the past, and a 1 ms minimum cannot spin (it matches the timer granularity every hosted adapter here has).
Functions§
- shutdown_
datagram - The
SHUTDOWNdatagram (§3.2.7) a leaving side sends its peer so the peer closes at once instead of waiting out its idle timeout.Nonewhen the packet cannot be serialized.