Struct uflow::server::RemoteClient

source ·
pub struct RemoteClient { /* private fields */ }
Expand description

Used by a Server object to represent a connected client.

Implementations§

Returns true if the connection is active, that is, a connection handshake has been completed and the remote host has not yet timed out or disconnected. Returns false otherwise.

Enqueues a packet for delivery to this client. The packet will be sent on the given channel according to the specified mode.

If the connection is not active, the packet will be silently discarded.

Error Handling

This function will panic if channel_id does not refer to a valid channel (i.e. if channel_id >= CHANNEL_COUNT), or if data.len() exceeds the maximum packet size.

Gracefully terminates this connection once all packets have been sent.

If any outbound packets are pending, they will be sent prior to disconnecting. Reliable packets can be assumed to have been delievered, so long as the client does not also disconnect in the meantime. The connection will remain active until the next call to Server::step() with no pending outbound packets.

Gracefully terminates this connection as soon as possible.

If any outbound packets are pending, they may be flushed prior to disconnecting, but no packets are guaranteed to be received by the client. The connection will remain active until the next call to Server::step().

Returns the current estimate of the round-trip time (RTT), in seconds.

If the RTT has not yet been computed, or if the connection is not active, None is returned instead.

Returns the total size of the send buffer (i.e. those packets which have not yet been acknowledged), in bytes.

This figure represents the amount of memory allocated for outgoing packets. Packets which are marked TimeSensitive are included in this total, even if they would not be sent.

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.