pub struct NegotiatedParams {
pub version: u32,
pub flags: HandshakeExtensionMessageFlags,
pub latency_ms: u16,
pub own_socket_id: u32,
pub peer_socket_id: u32,
pub stream_id: Option<String>,
pub group: Option<GroupMembershipExtension>,
pub sek: Option<Vec<u8>>,
pub salt: Option<[u8; 16]>,
}Expand description
The outcome of a Caller-Listener handshake, once both TSBPD delays and
flags have been reconciled per draft-sharabayko-srt-01 §4.3.1.2 (“The
value for latency is always agreed to be the greater of those reported by
each party”).
Fields§
§version: u32The negotiated base protocol version — always 5 (HSv5) for a
completed handshake in this crate.
flags: HandshakeExtensionMessageFlagsThe flags both sides advertised, ANDed together (only mutually supported capabilities are considered agreed).
latency_ms: u16The agreed TSBPD latency in milliseconds: the greater of this side’s
configured HandshakeConfig::latency_ms and the peer’s reported
Receiver/Sender TSBPD Delay (§4.3.1.2).
own_socket_id: u32This side’s own SRT Socket ID.
peer_socket_id: u32The peer’s SRT Socket ID.
stream_id: Option<String>The negotiated Stream ID (§3.2.1.3), if one was advertised.
group: Option<GroupMembershipExtension>The negotiated Group Membership (§3.2.1.4), if one was advertised.
sek: Option<Vec<u8>>crypto only.The negotiated Stream Encrypting Key (§6.1.5), if
HandshakeConfig::crypto was set on this side and the Key Material
exchange succeeded. None if encryption was not negotiated.
salt: Option<[u8; 16]>crypto only.The Salt paired with Self::sek — both are required by
crate::crypto::aes_ctr_apply to encrypt/decrypt a data packet’s
payload (§6.1.2/§6.2.2/§6.3.2).
Trait Implementations§
Source§impl Clone for NegotiatedParams
impl Clone for NegotiatedParams
Source§fn clone(&self) -> NegotiatedParams
fn clone(&self) -> NegotiatedParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NegotiatedParams
impl Debug for NegotiatedParams
Source§impl PartialEq for NegotiatedParams
impl PartialEq for NegotiatedParams
Source§impl Serialize for NegotiatedParams
Available on crate feature serde only.
impl Serialize for NegotiatedParams
serde only.