Repclication client. More...
Public Member Functions | |
void | AuthenticatePlayerId (ulong id) |
Authenticate as a player with an ID. More... | |
void | AuthenticatePlayerIdWithToken (ulong id, string token) |
Authenticate as a player with an ID - verification with a 32 character token on the muxer side. More... | |
bool | SendEvent (byte[] data, bool blocking) |
Asynchronyously send an event to the simulation More... | |
bool | IsConnected () |
Returns true if connection is still valid. More... | |
byte[] | ReceiveMessage () |
Attempt to return a message from the incoming message buffer. More... | |
unsafe UnsafeSpan | UnsafeReceiveMessage () |
Attempt to return a message from the incoming message buffer. More... | |
void | Dispose () |
Free the native resources allocated by the object. More... | |
Static Public Member Functions | |
static Repclient | Connection (string host, string port) |
A repclient instance connected to a given host/port. More... | |
static Repclient | RecordConnection (string host, string port, string recordingFile) |
A repclient instance connected to a given host/port, which stores the messages received to a recording file. More... | |
static Repclient | ReplayRecordedConnection (String recordingFile) |
A repclient instance replaying the connection from a file. More... | |
Protected Member Functions | |
virtual void | Dispose (bool disposing) |
Repclication client.
Responsible for authentication and communication with the Aether simulation.
|
inline |
Authenticate as a player with an ID.
Authentication is asynchronyous, authentication failure will disconnect this client (it might take time to propagate the disconnect). More than 1 client with the same id can be connected at one time, the output of the simulation will be replicated to all.
id | player's id |
|
inline |
Authenticate as a player with an ID - verification with a 32 character token on the muxer side.
Authentication is asynchronyous, authentication failure will disconnect this client (it might take time to propagate the disconnect). More than 1 client with the same id can be connected at one time, the output of the simulation will be replicated to all.
id | player's id |
token | 32-char long token; not null |
|
inlinestatic |
A repclient instance connected to a given host/port.
Blocks until a connection is established or a timeout reached.
host | muxer hostname to connect to; not null |
port | muxer port to connect to (usually 8881); not null |
|
inline |
Free the native resources allocated by the object.
|
inlineprotectedvirtual |
|
inline |
Returns true if connection is still valid.
|
inline |
Attempt to return a message from the incoming message buffer.
The buffer is populated asynchronyously in a native background thread.
|
inlinestatic |
A repclient instance connected to a given host/port, which stores the messages received to a recording file.
Blocks until a connection is established or a timeout reached.
host | muxer hostname to connect to; not null |
port | muxer port to connect to (usually 8881); not null |
recordingFile | path to a recording file; not null |
|
inlinestatic |
A repclient instance replaying the connection from a file.
recordingFile | path to a recording file; not null |
|
inline |
Asynchronyously send an event to the simulation
data | binary blob to send; not null |
blocking | if set to false, the event might be dropped when the sending buffer is full |
|
inline |
Attempt to return a message from the incoming message buffer.
The buffer is populated asynchronyously in a native background thread.