Struct cobalt::ClientState [] [src]

pub struct ClientState<S: Socket> {
    // some fields omitted
}

A structure used for synchronous calls on a Client instance.

Methods

impl<S: Socket> ClientState<S>
[src]

fn rtt(&self) -> u32

Returns the average roundtrip time for this client's underlying connection.

fn packet_loss(&self) -> f32

Returns the percent of packets that were sent and never acknowledged over the total number of packets that have been send across this client's underlying connection.

fn stats(&self) -> Stats

Returns statistics (i.e. bandwidth usage) for the last second, of this client'sunderlying connection.

fn local_addr(&self) -> SocketAddr

Returns the socket address for the local end of this client's underlying connection.

fn peer_addr(&self) -> SocketAddr

Returns the socket address for the remote end of this client's underlying connection.

fn set_config(&mut self, config: Config)

Overrides the configuration of this client's underlying connection.

fn send(&mut self, kind: MessageKind, payload: Vec<u8>)

Sends a message of the specified kind along with its payload over this client's underlying connection.

fn reset(&mut self)

Resets this client's underlying connection state.

Trait Implementations

impl<S: Debug + Socket> Debug for ClientState<S>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.