#[non_exhaustive]pub struct LinkSetup {
pub params: NegotiatedParams,
pub peer_initial_seq: u32,
pub time_base_us: i64,
}link only.Expand description
What settled a connection: its negotiated parameters and the peer’s own handshake values.
The peer’s initial sequence number seeds ARQ/TSBPD sequence tracking and its handshake
timestamp seeds the TSBPD time base (rule 12); its SRT Socket ID is the wire dest_socket_id
for every outgoing packet (the two are unrelated values, §3).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.params: NegotiatedParamsThe negotiated parameters.
peer_initial_seq: u32The peer’s initial sequence number.
time_base_us: i64The TSBPD time base (µs, signed): T_NOW - HSREQ_TIMESTAMP, with T_NOW the connection’s
own clock at the instant the peer’s handshake arrived.
Implementations§
Source§impl LinkSetup
impl LinkSetup
Sourcepub fn new(
params: NegotiatedParams,
peer_initial_seq: u32,
peer_timestamp_us: u32,
) -> Self
pub fn new( params: NegotiatedParams, peer_initial_seq: u32, peer_timestamp_us: u32, ) -> Self
What params and the peer’s own handshake values settle, for a Link that starts
measuring at the instant that handshake arrived (the time base is the negated timestamp).
Sourcepub fn with_time_base_us(self, time_base_us: i64) -> Self
pub fn with_time_base_us(self, time_base_us: i64) -> Self
The time base of a connection whose clock started before the peer’s handshake arrived.
Sourcepub fn with_arrival(self, t_now: Duration, peer_timestamp_us: u32) -> Self
pub fn with_arrival(self, t_now: Duration, peer_timestamp_us: u32) -> Self
The time base of a connection whose clock started before the peer’s handshake arrived,
from T_NOW, the clock’s reading at that arrival, and the peer’s handshake timestamp.
Sourcepub fn peer_socket_id(&self) -> u32
pub fn peer_socket_id(&self) -> u32
The peer’s SRT Socket ID.