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
impl AckFrequencyConfig
Sourcepub fn ack_eliciting_threshold(
&mut self,
value: VarInt,
) -> &mut AckFrequencyConfig
pub fn ack_eliciting_threshold( &mut self, value: VarInt, ) -> &mut AckFrequencyConfig
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.
Sourcepub fn max_ack_delay(
&mut self,
value: Option<Duration>,
) -> &mut AckFrequencyConfig
pub fn max_ack_delay( &mut self, value: Option<Duration>, ) -> &mut AckFrequencyConfig
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.
Sourcepub fn reordering_threshold(&mut self, value: VarInt) -> &mut AckFrequencyConfig
pub fn reordering_threshold(&mut self, value: VarInt) -> &mut AckFrequencyConfig
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
impl Clone for AckFrequencyConfig
Source§fn clone(&self) -> AckFrequencyConfig
fn clone(&self) -> AckFrequencyConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AckFrequencyConfig
impl Debug for AckFrequencyConfig
Source§impl Default for AckFrequencyConfig
impl Default for AckFrequencyConfig
Source§fn default() -> AckFrequencyConfig
fn default() -> AckFrequencyConfig
Auto Trait Implementations§
impl Freeze for AckFrequencyConfig
impl RefUnwindSafe for AckFrequencyConfig
impl Send for AckFrequencyConfig
impl Sync for AckFrequencyConfig
impl Unpin for AckFrequencyConfig
impl UnwindSafe for AckFrequencyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)