pub struct AckFrequencyConfig { /* private fields */ }
Expand description

Parameters for controlling the peer’s acknowledgement frequency

The parameters provided in this config will be sent to the peer at the beginning of the connection, so it can take them into account when sending acknowledgements (see each parameter’s description for details on how it influences acknowledgement frequency).

Quinn’s implementation follows the fourth draft of the QUIC Acknowledgement Frequency extension. The defaults produce behavior slightly different than the behavior without this extension, because they change the way reordered packets are handled (see AckFrequencyConfig::reordering_threshold for details).

Implementations§

source§

impl AckFrequencyConfig

source

pub fn ack_eliciting_threshold(&mut self, value: VarInt) -> &mut Self

The ack-eliciting threshold we will request the peer to use

This threshold represents the number of ack-eliciting packets an endpoint may receive without immediately sending an ACK.

The remote peer should send at least one ACK frame when more than this number of ack-eliciting packets have been received. A value of 0 results in a receiver immediately acknowledging every ack-eliciting packet.

Defaults to 1, which sends ACK frames for every other ack-eliciting packet.

source

pub fn max_ack_delay(&mut self, value: Option<Duration>) -> &mut Self

The max_ack_delay we will request the peer to use

This parameter represents the maximum amount of time that an endpoint waits before sending an ACK when the ack-eliciting threshold hasn’t been reached.

The effective max_ack_delay will be clamped to be at least the peer’s min_ack_delay transport parameter, and at most the greater of the current path RTT or 25ms.

Defaults to None, in which case the peer’s original max_ack_delay will be used, as obtained from its transport parameters.

source

pub fn reordering_threshold(&mut self, value: VarInt) -> &mut Self

The reordering threshold we will request the peer to use

This threshold represents the amount of out-of-order packets that will trigger an endpoint to send an ACK, without waiting for ack_eliciting_threshold to be exceeded or for max_ack_delay to be elapsed.

A value of 0 indicates out-of-order packets do not elicit an immediate ACK. A value of 1 immediately acknowledges any packets that are received out of order (this is also the behavior when the extension is disabled).

It is recommended to set this value to TransportConfig::packet_threshold minus one. Since the default value for TransportConfig::packet_threshold is 3, this value defaults to 2.

Trait Implementations§

source§

impl Clone for AckFrequencyConfig

source§

fn clone(&self) -> AckFrequencyConfig

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for AckFrequencyConfig

source§

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

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

impl Default for AckFrequencyConfig

source§

fn default() -> Self

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

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more