[][src]Struct naia_shared::RttTracker

pub struct RttTracker { /* fields omitted */ }

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

impl Debug for RttTracker[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.