Enum uflow::server::Event

source ·
pub enum Event {
    Connect(SocketAddr),
    Disconnect(SocketAddr),
    Receive(SocketAddrBox<[u8]>),
    Error(SocketAddrErrorType),
}
Expand description

Used to signal connection events and deliver received packets.

Variants§

§

Connect(SocketAddr)

Indicates a successful connection from a client.

§

Disconnect(SocketAddr)

Indicates that a client has disconnected. A disconnection event is only produced if either party explicitly terminates an active connection.

§

Receive(SocketAddrBox<[u8]>)

Signals a packet received from a client.

§

Error(SocketAddrErrorType)

Indicates that a connection has been terminated due to an unrecoverable error.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.