Struct s2n_quic_transport::recovery::RttEstimator
source · [−]pub struct RttEstimator { /* private fields */ }
Implementations
sourceimpl RttEstimator
impl RttEstimator
sourcepub fn new(max_ack_delay: Duration) -> RttEstimator
pub fn new(max_ack_delay: Duration) -> RttEstimator
Creates a new RTT Estimator with default initial values using the given max_ack_delay
.
sourcepub fn latest_rtt(&self) -> Duration
pub fn latest_rtt(&self) -> Duration
Gets the latest round trip time sample
sourcepub fn smoothed_rtt(&self) -> Duration
pub fn smoothed_rtt(&self) -> Duration
Gets the weighted average round trip time
sourcepub fn first_rtt_sample(&self) -> Option<Timestamp>
pub fn first_rtt_sample(&self) -> Option<Timestamp>
Gets the timestamp of the first RTT sample
sourcepub fn max_ack_delay(&self) -> Duration
pub fn max_ack_delay(&self) -> Duration
Gets the max_ack_delay
pub fn pto_period(&self, pto_backoff: u32, space: PacketNumberSpace) -> Duration
sourceimpl RttEstimator
impl RttEstimator
pub fn update_rtt(
&mut self,
ack_delay: Duration,
rtt_sample: Duration,
timestamp: Timestamp,
is_handshake_confirmed: bool,
space: PacketNumberSpace
)
sourcepub fn persistent_congestion_threshold(&self) -> Duration
pub fn persistent_congestion_threshold(&self) -> Duration
Calculates the persistent congestion threshold used for determining if persistent congestion is being encountered.
sourcepub fn on_persistent_congestion(&mut self)
pub fn on_persistent_congestion(&mut self)
Allows min_rtt and smoothed_rtt to be overwritten on the next RTT sample after persistent congestion is established.
Trait Implementations
sourceimpl Clone for RttEstimator
impl Clone for RttEstimator
sourcefn clone(&self) -> RttEstimator
fn clone(&self) -> RttEstimator
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RttEstimator
impl Debug for RttEstimator
sourceimpl Hash for RttEstimator
impl Hash for RttEstimator
sourceimpl PartialEq<RttEstimator> for RttEstimator
impl PartialEq<RttEstimator> for RttEstimator
sourcefn eq(&self, other: &RttEstimator) -> bool
fn eq(&self, other: &RttEstimator) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RttEstimator) -> bool
fn ne(&self, other: &RttEstimator) -> bool
This method tests for !=
.
impl Copy for RttEstimator
impl Eq for RttEstimator
impl StructuralEq for RttEstimator
impl StructuralPartialEq for RttEstimator
Auto Trait Implementations
impl RefUnwindSafe for RttEstimator
impl Send for RttEstimator
impl Sync for RttEstimator
impl Unpin for RttEstimator
impl UnwindSafe for RttEstimator
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more