pub struct Client<P: ProtocolType, E: Copy + Eq + Hash> { /* 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

Connect to the given server address

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

Queues up an Message to be sent to the Server

Queues up a Command for an assigned Entity 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

Return whether or not a connection has been established 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 last received tick from the Server

Gets the interpolation tween amount for the current frame

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.

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

Performs the conversion.

Performs the conversion.

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.