Struct quinn_proto::AckFrequencyConfig
source · 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 Self
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.
sourcepub fn max_ack_delay(&mut self, value: Option<Duration>) -> &mut Self
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.
sourcepub fn reordering_threshold(&mut self, value: VarInt) -> &mut Self
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
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
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
)