pub struct Client<P: Protocolize, E: Copy + Eq + Hash, C: ChannelIndex> { /* private fields */ }
Expand description

Client can send/receive messages to/from a server, and has a pool of in-scope entities/components that are synced with the server

Implementations

Create a new Client

Set the auth object to use when setting up a connection with the Server

Connect to the given server address

Returns whether or not the client is disconnected

Returns whether or not a connection is being established with the Server

Returns whether or not a connection has been established with the Server

Disconnect from Server

Must call this regularly (preferably at the beginning of every draw frame), in a loop until it returns None. Retrieves incoming update data, and maintains the connection.

Queues up an Message to be sent to the Server

Retrieves an EntityRef that exposes read-only operations for the given Entity. Panics if the Entity does not exist.

Return a list of all Entities

Get the address currently associated with the Server

Gets the average Round Trip Time measured to the Server

Gets the average Jitter measured in connection to the Server

Gets the current tick of the Client

Gets the interpolation tween amount for the current frame

Trait Implementations

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.