Diarkis C# Client SDK
Public Member Functions | List of all members
Diarkis.Modules.RPC Class Reference

Manages RPC calls and their executions via Room class. More...

Public Member Functions

 RPC (Room room)
 Instantiate RPC class. More...
 
bool Register (int rpcID, Action< byte[]> callback)
 Registers An RPC method associated with rpcID (rpcID must be unique per RPC method). More...
 
bool RPCAll (int rpcID, byte[] payload, bool reliable=true)
 Sends an RPC command to all remote clients. More...
 
bool RPCMany (int rpcID, List< string > userIDs, byte[] payload, bool reliable=true)
 Sends an RPC command to selected remote clients. More...
 
bool RPCOne (int rpcID, string userID, byte[] payload, bool reliable=true)
 Sends an RPC command to a selected remote client. More...
 

Detailed Description

Manages RPC calls and their executions via Room class.

Constructor & Destructor Documentation

◆ RPC()

Diarkis.Modules.RPC.RPC ( Room  room)
inline

Instantiate RPC class.

Parameters
roomA room instance of the room that the client is member of.

Member Function Documentation

◆ Register()

bool Diarkis.Modules.RPC.Register ( int  rpcID,
Action< byte[]>  callback 
)
inline

Registers An RPC method associated with rpcID (rpcID must be unique per RPC method).

Parameters
rpcIDA unique ID of RPC method to be associated with the RPC function.
callbackThe RPC function associated with rpcID tobe executed remotely.

◆ RPCAll()

bool Diarkis.Modules.RPC.RPCAll ( int  rpcID,
byte[]  payload,
bool  reliable = true 
)
inline

Sends an RPC command to all remote clients.

Parameters
rpcIDRPC ID associated with the method to be exeuted.
Parameters
payloadRPC parameter(s) as a byte array.
Parameters
reliableFor UDP client, setting this is true will indicate RUDP transimission.

◆ RPCMany()

bool Diarkis.Modules.RPC.RPCMany ( int  rpcID,
List< string >  userIDs,
byte[]  payload,
bool  reliable = true 
)
inline

Sends an RPC command to selected remote clients.

Parameters
rpcIDRPC ID associated with the method to be exeuted.
Parameters
rpcIDList of remote client user IDs.
Parameters
userIDsA list of user IDs to execute an RPC remotely.
payloadRPC parameter(s) as a byte array.
Parameters
reliableFor UDP client, setting this is true will indicate RUDP transimission.

◆ RPCOne()

bool Diarkis.Modules.RPC.RPCOne ( int  rpcID,
string  userID,
byte[]  payload,
bool  reliable = true 
)
inline

Sends an RPC command to a selected remote client.

Parameters
rpcIDRPC ID associated with the method to be exeuted.
Parameters
rpcIDList of remote client user IDs.
Parameters
userIDA User ID to execute an RPC remotely.
payloadRPC parameter(s) as a byte array.
Parameters
reliableFor UDP client, setting this is true will indicate RUDP transimission.

The documentation for this class was generated from the following file: