[−][src]Struct naia_shared::RttTracker
Tracks the current Round Trip Time of the connection
Implementations
impl RttTracker[src]
pub fn new(rtt_smoothing_factor: f32, rtt_max_value: u16) -> RttTracker[src]
Creates a new RttTracker which is used to keep track of the Round Trip Time of a connection
pub fn process_incoming(&mut self, incoming_seq: u16)[src]
Process an incoming packet, calculates Round Trip Time
pub fn process_outgoing(&mut self, seq: u16)[src]
Process an outgoing packet, recording the time it was sent in order to measure time elapsed to a response
pub fn get_rtt(&self) -> f32[src]
Get the current measured Round Trip Time for the connection
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RttTracker
impl Send for RttTracker
impl Sync for RttTracker
impl Unpin for RttTracker
impl UnwindSafe for RttTracker
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,