Skip to main content

HandshakeConfig

Struct HandshakeConfig 

Source
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: u16

TSBPD 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: u32

Maximum Transmission Unit Size (§3.2.1).

§max_flow_window_size: u32

Maximum Flow Window Size (§3.2.1).

§initial_seq_number: u32

Initial 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: u32

The SRT Version this side reports in its Handshake Extension Message (major * 0x10000 + minor * 0x100 + patch, §3.2.1.1).

§flags: HandshakeExtensionMessageFlags

SRT Flags this side advertises (§3.2.1.1.1, Table 6).

§encryption_field: EncryptionField

Advertised 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: u32

Number 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: u32

Maximum number of retransmissions before the handshake gives up (HandshakeOutput::TimedOut).

§crypto: Option<CryptoConfig>
Available on crate feature 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

Source§

fn clone(&self) -> HandshakeConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HandshakeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for HandshakeConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for HandshakeConfig

Source§

fn eq(&self, other: &HandshakeConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for HandshakeConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.