pub struct HandshakeConfig {Show 13 fields
pub latency_ms: u16,
pub mtu: u32,
pub max_flow_window_size: u32,
pub initial_seq_number: u32,
pub srt_version: u32,
pub flags: HandshakeExtensionMessageFlags,
pub encryption_field: EncryptionField,
pub stream_id: Option<String>,
pub group: Option<GroupMembershipExtension>,
pub local_ip: [u32; 4],
pub retransmit_after_ticks: u32,
pub max_retries: u32,
pub crypto: Option<CryptoConfig>,
}Expand description
Local configuration for one side of a Caller-Listener handshake — the
values this engine advertises (draft-sharabayko-srt-01 §3.2.1,
§3.2.1.1, §3.2.1.3, §3.2.1.4).
Fields§
§latency_ms: u16TSBPD delay in milliseconds this side requests, sent as both the Receiver and Sender TSBPD Delay of its Handshake Extension Message (§3.2.1.1, Figure 6). The negotiated value is the greater of the two parties’ requests (§4.3.1.2).
mtu: u32Maximum Transmission Unit Size (§3.2.1).
max_flow_window_size: u32Maximum Flow Window Size (§3.2.1).
initial_seq_number: u32Initial Packet Sequence Number this side will use for its first data packet (§3.2.1). No data plane exists yet in this crate; callers of a later data-plane PR are expected to set this to a real ISN.
srt_version: u32The SRT Version this side reports in its Handshake Extension
Message (major * 0x10000 + minor * 0x100 + patch, §3.2.1.1).
flags: HandshakeExtensionMessageFlagsSRT Flags this side advertises (§3.2.1.1.1, Table 6).
encryption_field: EncryptionFieldAdvertised cipher family and block size (§3.2.1, Table 2). Actual key-wrap/unwrap crypto is an explicit follow-up; this field is negotiated but not acted on in this release.
stream_id: Option<String>Stream ID to advertise (Caller only — §3.2.1.3); None sends no
Stream ID extension.
group: Option<GroupMembershipExtension>Group Membership to advertise (§3.2.1.4); None sends no Group
extension.
local_ip: [u32; 4]This side’s own IP address, reported in every outgoing handshake
packet’s Peer IP Address field (§3.2.1: “IPv4 or IPv6 address of
the packet’s sender” — despite the field’s name, each party reports
its own address, not its peer’s).
retransmit_after_ticks: u32Number of crate::caller::CallerHandshake::tick /
crate::listener::ListenerHandshake::tick calls with no reply
before the last-sent handshake packet is retransmitted. Timeouts are
modeled as caller-driven ticks — no wall-clock lives in this crate.
max_retries: u32Maximum number of retransmissions before the handshake gives up
(HandshakeOutput::TimedOut).
crypto: Option<CryptoConfig>crypto only.Opt-in §6 payload-encryption negotiation (crypto feature only).
None (the default) means this side neither offers nor requires
encryption. See CryptoConfig for the caller-supplied Salt/SEK
contract.
Trait Implementations§
Source§impl Clone for HandshakeConfig
impl Clone for HandshakeConfig
Source§fn clone(&self) -> HandshakeConfig
fn clone(&self) -> HandshakeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more