pub struct NetcodeClient { /* private fields */ }
Expand description

A client that can generate encrypted packets that be sent to the connected server, or consume encrypted packets from the server. The client is agnostic from the transport layer, only consuming and generating bytes that can be transported in any way desired.

Implementations

Returns the reason that the client was disconnected for.

Returns the current server address the client is connected or trying to connect.

Disconnect the client from the server. Returns a disconnect packet that should be sent to the server.

Process any packet received from the server. This function might return a payload sent from the server. If nothing is returned, it was a packet used for the internal protocol or an invalid packet.

Returns the server address and an encrypted payload packet that can be sent to the server.

Update the internal state of the client, receives the duration since last updated. Might return the serve address and a protocol packet to be sent to the server.

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.

Should always be Self

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.