pub struct Settings {
pub max_ack_delay: Duration,
pub ack_delay_exponent: u8,
pub ack_elicitation_interval: u8,
pub ack_ranges_limit: u8,
}Expand description
Settings for ACK frames
Fields
max_ack_delay: DurationThe maximum ACK delay indicates the maximum amount of time by which the endpoint will delay sending acknowledgments.
ack_delay_exponent: u8The ACK delay exponent is an integer value indicating an exponent used to decode the ACK Delay field in the ACK frame
ack_elicitation_interval: u8The number of packets received before sending an ACK-eliciting packet
ack_ranges_limit: u8The number of packet number intervals an endpoint is willing to store
Implementations
sourceimpl Settings
impl Settings
pub const EARLY: Self = Self { max_ack_delay: Duration::from_secs(0), ack_delay_exponent: 0, ..Self::RECOMMENDED }
pub const RECOMMENDED: Self = Self { max_ack_delay: MaxAckDelay::RECOMMENDED.as_duration(), ack_delay_exponent: AckDelayExponent::RECOMMENDED.as_u8(), ack_elicitation_interval: RECOMMENDED_ELICITATION_INTERVAL, ack_ranges_limit: RECOMMENDED_RANGES_LIMIT, }
sourcepub fn decode_ack_delay(&self, delay: VarInt) -> Duration
pub fn decode_ack_delay(&self, delay: VarInt) -> Duration
Decodes the peer’s Ack Delay field
sourcepub fn encode_ack_delay(&self, delay: Duration) -> VarInt
pub fn encode_ack_delay(&self, delay: Duration) -> VarInt
Encodes the local Ack Delay field
Trait Implementations
impl Copy for Settings
Auto Trait Implementations
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more