Struct network_time::RetransmissionTimeOutData [−][src]
pub struct RetransmissionTimeOutData { /* fields omitted */ }
Maintains the state of the retransmission time out timer.
- Calculates according to RFC 6298
- Resets the interpretation of the measurement of round-trip times once a threshold of back off doubling is reached (MaximumNumberOfBackOffsBeforeResettingMeasurements).
This logic is based on RFC 6298, which obsoleted RFC 2988 (which itself clarified RFC 1122 and RFC 793 and complemented RFC 2581).
In practice, RFC 6298 is extremely similar to RFC 2988.
This timer is used with congestion control; see RFC 5681 (which itself obsoletes RFC 2581).
Methods
impl RetransmissionTimeOutData
[src]
impl RetransmissionTimeOutData
pub const InitialSmoothedRoundTripTime: MillisecondDuration
InitialSmoothedRoundTripTime: MillisecondDuration = MillisecondDuration(<Self>::MinimumRetransmissionTimeOut.0 / 3)
This is the reverse of the logic in compute_retransmission_time_out()
.
pub const InitialRoundTripTimeVariance: MillisecondDuration
InitialRoundTripTimeVariance: MillisecondDuration = MillisecondDuration(<Self>::InitialSmoothedRoundTripTime.0 / 2)
This matches the logic in first_measurement_of_round_trip_time_made()
.
pub fn new(
smoothed_round_trip_time: MillisecondDuration,
round_trip_time_variance: MillisecondDuration,
is_for_non_synchronized_state: bool
) -> Self
[src]
pub fn new(
smoothed_round_trip_time: MillisecondDuration,
round_trip_time_variance: MillisecondDuration,
is_for_non_synchronized_state: bool
) -> Self
Creates a new instance.
pub fn retransmission_time_out(&self) -> MillisecondDuration
[src]
pub fn retransmission_time_out(&self) -> MillisecondDuration
Current retransmission time out, RTO
.
pub fn increment_retransmissions(&mut self) -> Option<u8>
[src]
pub fn increment_retransmissions(&mut self) -> Option<u8>
Increment retransmissions.
pub fn reset_retransmissions(&mut self)
[src]
pub fn reset_retransmissions(&mut self)
Reset retransmissions.
pub fn reset_after_establishment_of_state_if_we_sent_the_first_synchronize_segment_and_the_timer_expired(
&mut self
)
[src]
pub fn reset_after_establishment_of_state_if_we_sent_the_first_synchronize_segment_and_the_timer_expired(
&mut self
)
Reset retransmissions after establishing state if we sent the first Synchronize segment and the retransmission timer fired at least once.
pub fn entering_established_state(&mut self)
[src]
pub fn entering_established_state(&mut self)
Entering established state; a different set of back off scalars will now apply.
pub fn process_measurement_of_round_trip_time(
&mut self,
measurement_of_round_trip_time: MillisecondDuration
)
[src]
pub fn process_measurement_of_round_trip_time(
&mut self,
measurement_of_round_trip_time: MillisecondDuration
)
Process a round trip time measurement.
pub fn smoothed_round_trip_time_and_round_trip_time_variance(
&self
) -> (MillisecondDuration, MillisecondDuration)
[src]
pub fn smoothed_round_trip_time_and_round_trip_time_variance(
&self
) -> (MillisecondDuration, MillisecondDuration)
Obtain current smoothed round trip time, SRTT
, and round trip time variances, RTTVAR
.
Trait Implementations
impl Debug for RetransmissionTimeOutData
[src]
impl Debug for RetransmissionTimeOutData
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for RetransmissionTimeOutData
[src]
impl Clone for RetransmissionTimeOutData
fn clone(&self) -> RetransmissionTimeOutData
[src]
fn clone(&self) -> RetransmissionTimeOutData
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for RetransmissionTimeOutData
[src]
impl PartialEq for RetransmissionTimeOutData
fn eq(&self, other: &RetransmissionTimeOutData) -> bool
[src]
fn eq(&self, other: &RetransmissionTimeOutData) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &RetransmissionTimeOutData) -> bool
[src]
fn ne(&self, other: &RetransmissionTimeOutData) -> bool
This method tests for !=
.
impl Eq for RetransmissionTimeOutData
[src]
impl Eq for RetransmissionTimeOutData
impl PartialOrd for RetransmissionTimeOutData
[src]
impl PartialOrd for RetransmissionTimeOutData
fn partial_cmp(&self, other: &RetransmissionTimeOutData) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &RetransmissionTimeOutData) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &RetransmissionTimeOutData) -> bool
[src]
fn lt(&self, other: &RetransmissionTimeOutData) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &RetransmissionTimeOutData) -> bool
[src]
fn le(&self, other: &RetransmissionTimeOutData) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &RetransmissionTimeOutData) -> bool
[src]
fn gt(&self, other: &RetransmissionTimeOutData) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &RetransmissionTimeOutData) -> bool
[src]
fn ge(&self, other: &RetransmissionTimeOutData) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for RetransmissionTimeOutData
[src]
impl Ord for RetransmissionTimeOutData
fn cmp(&self, other: &RetransmissionTimeOutData) -> Ordering
[src]
fn cmp(&self, other: &RetransmissionTimeOutData) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for RetransmissionTimeOutData
[src]
impl Hash for RetransmissionTimeOutData
Auto Trait Implementations
impl Send for RetransmissionTimeOutData
impl Send for RetransmissionTimeOutData
impl Sync for RetransmissionTimeOutData
impl Sync for RetransmissionTimeOutData