pub struct ListenerLimits {
pub max_pending: usize,
pub pending_tick: Duration,
pub cookie_key_rotation: Duration,
pub recent_accept_ttl: Duration,
}tokio only.Expand description
The listener’s own bounds, chosen by the caller of SrtListener::bind through
IoConfig::listener.
Fields§
§max_pending: usizeUpper bound on concurrently in-progress handshakes, and on remembered CONCLUSION responses (one per recently accepted source address). Every new source address that sends an INDUCTION allocates an entry; without a cap a flood of (possibly spoofed) handshake packets exhausts memory before any of them times out.
pending_tick: DurationHow often accept drives pending-handshake expiry and retransmits, independent of receive activity.
How often the SYN-cookie key is replaced (§4.3.1.1 buckets the cookie’s time input to one minute).
recent_accept_ttl: DurationHow long an accepted connection’s CONCLUSION response is remembered so a repeated CONCLUSION (the response was lost) can be answered again.
Implementations§
Source§impl ListenerLimits
impl ListenerLimits
Sourcepub fn for_profile(profile: Profile) -> Self
pub fn for_profile(profile: Profile) -> Self
The Profile preset, replaceable through its with_* setters.
Sourcepub fn with_max_pending(self, value: usize) -> Self
pub fn with_max_pending(self, value: usize) -> Self
Replace Self::max_pending.
Sourcepub fn with_pending_tick(self, value: Duration) -> Self
pub fn with_pending_tick(self, value: Duration) -> Self
Replace Self::pending_tick.
Replace Self::cookie_key_rotation.
Sourcepub fn with_recent_accept_ttl(self, value: Duration) -> Self
pub fn with_recent_accept_ttl(self, value: Duration) -> Self
Replace Self::recent_accept_ttl.