Enum cobalt::ClientEvent [] [src]

pub enum ClientEvent {
    Connection,
    ConnectionFailed,
    ConnectionLost(bool),
    ConnectionClosed(bool),
    Message(Vec<u8>),
    PacketLost(Vec<u8>),
    ConnectionCongestionStateChanged(bool),
}

Enum of client related network events.

Variants

Emitted once a connection to a server has been established.

Emitted when a initial connection attempt to a server failed.

Emitted when a existing connection to a server is lost.

The contained boolean indicates whether the connection was lost due to an isse the remote end, if the value is false instead, then a local issue caused the connection to be lost.

Emitted when a connection is closed programmatically.

The contained boolean indicates whether the connection was closed by the remote end, if the value is false instead, then the connection was closed locally.

Emitted for each message received from a server.

Emitted for each packet which was not confirmed by a server within the specified limits.

Emitted each time the connection's congestion state changes.

Trait Implementations

impl Debug for ClientEvent
[src]

Formats the value using the given formatter.

impl PartialEq for ClientEvent
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.