![]() |
Diarkis C# Client SDK
|
Room allows clients in the same "room" to exchange packets freely. More...
Classes | |
class | RoomChatData |
Represents a chat message data with its sender user ID and timestamp in milliseconds. More... | |
class | RoomListItem |
Represents a room data registered by Register. More... | |
Public Member Functions | |
delegate void | CreateHandler (bool success, string roomID, uint roomCreatedTime) |
delegate void | JoinHandler (bool success, uint roomCreatedTime) |
delegate void | LeaveHandler (bool success) |
delegate void | MessageHandler (byte[] message) |
delegate void | UpdatePropsHandler (bool success) |
delegate void | GetPropsHandler (bool success, Dictionary< string, byte[]> props) |
delegate void | GetOwnerIDHandler (bool success, string ownerID) |
delegate void | IncrPropHandler (bool success, long numProp) |
delegate void | GetMemberIDsHandler (bool success, string ownerID, string[] memberIDs) |
delegate void | IncrPropertySyncHandler (long numProp) |
delegate void | GetNumberOfMembersHandler (bool success, string roomID, int number, int maxnumber) |
delegate void | ResponseHandler (bool success, byte[] msg) |
delegate void | FindRoomsHandler (bool success, List< RoomListItem > rooms) |
delegate void | ChatHandler (RoomChatData chatData) |
delegate void | ChatLogHandler (bool success, List< RoomChatData > chatLog, byte[] payload) |
delegate void | P2PSyncHandler (bool success, Packet.P2PClientAddr[] p2pClientAddrs) |
delegate void | ObjUpdateHandler (byte mode, string name, Dictionary< string, double > obj) |
delegate void | ObjSyncHandler (bool success, Dictionary< string, Dictionary< string, double >> objects) |
delegate void | PropertySyncHandler (bool success, Dictionary< string, byte[]> props) |
bool | SetupAsTcp (Tcp tcp) |
Sets up the instance of as a TCP client. More... | |
bool | SetupAsUdp (Udp udp) |
Sets up the instance of as a UDP client. More... | |
bool | SetTcp (Tcp tcp) |
Changes the TCP instance for the room. More... | |
bool | SetUdp (Udp udp) |
Changes the UDP instance for the room. More... | |
virtual void | Destroy () |
Destroy all setup listeners and other internal properties. You will need to call SetupAs... to reuse the instance. More... | |
string | GetLastErrorMessage () |
Returns a last error message of either Create, Join, JoinRandom, Leave etc. More... | |
byte[] | GetLastErrorBytes () |
Returns a last error payload of either Create, Join, JoinRandom, Leave etc. More... | |
bool | StartP2PSync (byte linkedClients=0) |
Starts peer-to-peer comminucations with the remote clients in the same room. This method raises OnStartP2PSync event. More... | |
virtual void | SyncProperties () |
Retrieve properties of the room. Raises OnPropertySync. Only properties with byte array value will be synchronized. More... | |
virtual void | SyncObjects () |
Retrieves all room objects with their names and values. OnSyncObjects event will be raised. More... | |
virtual void | UpdateObject (byte mode, string name, Dictionary< string, double > obj, bool reliable) |
Manipulates a room object by its name. Successful execution of the operation raises OnObjectUpdate event on all room members including itself. There are 3 modes to manipulate a room object: More... | |
virtual void | UpdateProperties (string roomID, Dictionary< string, byte[]> props, bool sync) |
Creates/Replaces room properties by the given property names. The property values are stored as byte array and retrieved as such. This raises OnUpdateProperties event. More... | |
virtual void | GetProperties (string roomID, List< string > propNames) |
Gets room properties created/replaced by UpdateProperties method. all property values are retrived as byte array. This raises OnGetProperties event. More... | |
virtual void | GetOwnerID () |
Get the owner user ID of the room. The method raises OnGetOwnerID event. More... | |
virtual void | IncrProperty (string propName, long delta, bool sync) |
Increments pre-created long type room property of the matching property name by given delta. More... | |
virtual void | GetMemberIDs () |
Raises OnGetMemberIDs event and retrieves a list of member IDs and the room owner ID. More... | |
virtual void | GetNumberOfMembers (string roomID) |
Rasies OnGetNumberOfMembers event and retrieves number of a room. You may retrieve the number of members of a room that you are not part of as well. More... | |
virtual void | Create (ushort maxMembers, bool allowEmpty, bool join, ushort ttl, uint interval=200) |
Creates a new room. More... | |
virtual void | Join (string roomID, byte[] message) |
Joins a room. A client can NOT join more than one room at a time. More... | |
virtual void | Migrate () |
Migrates a rooom that the user is currently in. This operation can only be performed by the owner of the room. When successful, the owner user raises OnConnect event with reconnect flag true. All members of the room will automatically join the new migrated room without sending join broadcast. More... | |
void | Move (string roomID, byte[] leaveMessage, byte[] joinMessage, Action< bool, uint > callback=null) |
Leaves the room that the client is currently in and joins a new room. Raises OnLeave and OnJoin and remotely raises OnMemberLeave and OnMemberJoin. You may callback use the callback instead of listening to the regular events. More... | |
virtual void | Register (uint roomType, string roomName, string roomMetadata) |
Registers a room (the client is already a member of) with a type (used by FindRoomsByType). OnRegister event will be raised. More... | |
virtual void | FindRoomsByType (uint roomType, uint limit) |
Finds a list of rooms that have been registered with a type. Raises OnFindRoomsByType event. More... | |
virtual void | Reserve (List< string > userIDs) |
Reserves the spots for the users in the target room. More... | |
virtual void | CancelReservation (List< string > userIDs) |
Cancel the reservations for the users in the target room. More... | |
virtual void | CancelReservation (string roomID, List< string > userIDs) |
Cancel the reservations for the users in the target room. More... | |
virtual void | JoinRandom (ushort maxMembers, ushort ttl, byte[] message, bool allowEmpty=false, uint interval=200) |
Joins a random room if there is at lease room created by JoinRandom available. If not it will create a new room. If it does not find a room to join, it will instead create a new room. More... | |
virtual void | Leave (byte[] message) |
Leaves the room the client has joined. More... | |
virtual void | Leave (string roomID, byte[] message) |
Leaves the room the client has joined. More... | |
virtual void | Broadcast (byte[] message, bool reliable=true) |
Sends a message to all members of the room including the sender. More... | |
virtual void | BroadcastTo (string roomID, byte[] message, bool reliable=true) |
Sends a message to all members of the room including the sender. It will raise OnMemberBroadcast. More... | |
void | ExclusiveBroadcastTo (string roomID, byte[] message, bool reliable=true) |
Sends a message to all members of the room including the sender. It will raise OnMemberExclusiveBroadcast. More... | |
void | ExclusiveMessageTo (string roomID, List< string > memberIDs, byte[] message, bool reliable=true) |
Sends a message to a selected members of the room. It raises OnMemberMessage. More... | |
virtual void | MessageTo (List< string > memberIDs, byte[] message, bool reliable=true) |
Sends a message to a selected members of the room. It raises OnMemberMessage. More... | |
virtual void | MessageTo (string roomID, List< string > memberIDs, byte[] message, bool reliable=true) |
Sends a message to a selected members of the room. More... | |
void | Relay (byte[] message, bool reliable=false) |
Sends a message to all other members of the room except the sender. More... | |
void | RelayProfile (byte[] message, bool reliable=false) |
Sends a message to all other members of the room except the sender. More... | |
virtual void | SendChatMessage (string message) |
Sends a chat message to the members of the room. All chat messages will be stored on the server and can be retrieved by GetChatLog. OnChatSyncResponse will be raised as the response from the server, and OnChatSyncwill be raised on the remote member clients as they receive the chat message. More... | |
virtual void | GetChatLog () |
Retrieves all chat messages as a list. OnChatLog will be raised. More... | |
string | GetRoomID () |
Returns the room ID that the client has joined. More... | |
void | SetRoomID (string roomID) |
Sets room ID manually. More... | |
void | OnCustomMessagePush (uint ver, uint cmd, Action< byte[]> callback) |
Registers a callback on custom broadcast and/or message by ver and cmd. Must be callback AFTER group.SetupAsUdp or group.SetupAsTcp This is method is NOT compatible with Broadcast. Use with Message and/or Announce ONLY. More... | |
Public Attributes | |
byte[] | _exclusiveHeader = new byte[4]{ 0xc, 0xa, 0xf, 0xe } |
When a message (Broadcast and Message) starts with _exclusiveHeader, OnMemberBroadcast and OnMemberMessage will not raise. More... | |
Static Public Attributes | |
const byte | OBJ_INC_MODE = 0x01 |
const byte | OBJ_SET_MODE = 0x02 |
const byte | OBJ_DEL_MODE = 0x03 |
Protected Member Functions | |
void | setRoomID (string roomID) |
Sets _roomID manually. More... | |
void | setCreatedTime (uint createdTime) |
Sets _createdTime manually. More... | |
Protected Attributes | |
string | _roomID |
uint | _createdTime = 0 |
string | _lastErrMessage = "" |
byte[] | _lastErrBytes = new byte[0] |
Events | |
MessageHandler | OnRelay |
The event raised when the client receives a relay message from another room member. More... | |
MessageHandler | OnRelayProfile |
The event raised when the client receives a relay profile message from another room member. More... | |
virtual CreateHandler | OnCreate |
The event raised as a server response of Create. More... | |
virtual JoinHandler | OnJoin |
The event raised as a server response of Join. More... | |
virtual LeaveHandler | OnLeave |
The event raised as a server response of Leave. More... | |
virtual MessageHandler | OnMemberJoin |
The event raised when a remote client joins the room that you are in. More... | |
virtual MessageHandler | OnMemberLeave |
The event is raised when a remote member of the room you are in leaves the room. More... | |
virtual MessageHandler | OnMemberBroadcast |
The event is raised when a remote member client(s) of the room you are in sends a message via BroadcastTo. More... | |
virtual MessageHandler | OnMemberMessage |
The event is raised when a remote member client(s) of the room you are in sends a message via MessageTo. More... | |
virtual UpdatePropsHandler | OnUpdateProperties |
The event raised as a server response of UpdateProperties. More... | |
GetPropsHandler | OnUpdatePropertySync |
The event raised when properties are updated with sync flag. More... | |
virtual GetPropsHandler | OnGetProperties |
The event raised as a server response of GetProperties. More... | |
virtual GetOwnerIDHandler | OnGetOwnerID |
The event raised as a server response of GetOwnerID. More... | |
virtual IncrPropHandler | OnIncrProperty |
The event raised as a server response of IncrProperty. More... | |
virtual IncrPropertySyncHandler | OnIncrPropertySync |
The event raised when a remote member client of the room successfully executes IncrPorperty. More... | |
virtual GetMemberIDsHandler | OnGetMemberIDs |
The event raised as a server response of GetMemberIDs. More... | |
virtual ResponseHandler | OnRegister |
The event raised as a server response of Register. More... | |
virtual FindRoomsHandler | OnFindRoomsByType |
The event raised as a server response of FindRoomByType. More... | |
virtual ResponseHandler | OnReserve |
The event raised as a server response of Reserve. More... | |
virtual ResponseHandler | OnCancelReservation |
The event raised as a server response of CancelReserve. More... | |
virtual GetNumberOfMembersHandler | OnGetNumberOfMembers |
virtual ResponseHandler | OnChatSyncResponse |
Event raised when SendChatMessage is called. More... | |
virtual ChatHandler | OnChatSync |
Event raised when a chat message from a remote member is received. More... | |
virtual ChatLogHandler | OnChatLog |
Event raised when GetChatLog sends the history log of chat messages. More... | |
virtual P2PSyncHandler | OnStartP2PSync |
Event raised when StartP2PSync is successfully invoked. The event callback receives a list of remote clients to start peer-to-peer with. More... | |
virtual ObjUpdateHandler | OnObjectUpdate |
Event raised when UpdateObject is used to manipulate a room object. Any member of the room may maniplulate room objects and the event is raised. The event passes down the manipulated room object along with its name and value with mode that was used. There are 3 modes of manipulations: More... | |
virtual PropertySyncHandler | OnPropertySync |
Event raised when SyncProperties is used to retrieve existing properties in the room. Only properties with byte array value will be synchronized. More... | |
virtual ObjSyncHandler | OnObjectSync |
Event raised when SyncObjects is used as a response from the server. The event returns all room objects with their current values. More... | |
virtual GetOwnerIDHandler | OnOwnerChange |
Event raised when a new room owner has been elected by the server. More... | |
virtual MessageHandler | OnMemberExclusiveBroadcast |
virtual MessageHandler | OnMemberExclusiveMessage |
Room allows clients in the same "room" to exchange packets freely.
|
inlinevirtual |
Sends a message to all members of the room including the sender.
message | Message to be sent. |
reliable | This parameter is only relevant for UDP. If true, the message will be delivered as an RUDP message. |
|
inlinevirtual |
Sends a message to all members of the room including the sender. It will raise OnMemberBroadcast.
roomID | Room ID of the room that the message will be sent to. |
message | Message to be sent. |
reliable | This parameter is only relevant for UDP. If true, the message will be delivered as an RUDP message. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Cancel the reservations for the users in the target room.
IMPORTANT: User canceling reservations must be a joined member of the room.
userIDs | List of user IDs to cancel the reservations in the room. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Cancel the reservations for the users in the target room.
IMPORTANT: User canceling reservations must be a joined member of the room.
roomID | Room ID to remove the reservations from. |
userIDs | List of user IDs to cancel the reservations in the room. |
|
inlinevirtual |
Creates a new room.
maxMembers | Maximum number of clients allowed to join the room. |
allowEmpty | If true, the room will not be destroyed immediately when it is empty of clients. |
join | If true, the creator client of the room is automatically added to the room as a member. |
ttl | TTL of the room when it is empty of members in seconds. |
interval | Broadcast push interval in milliseconds. Default is 200ms. If 0 is given, broadcast packets will not be merged. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Destroy all setup listeners and other internal properties. You will need to call SetupAs... to reuse the instance.
Reimplemented in Diarkis.Modules.WsRoom.
|
inline |
Sends a message to all members of the room including the sender. It will raise OnMemberExclusiveBroadcast.
roomID | Room ID of the room that the message will be sent to. |
message | Message to be sent. |
reliable | This parameter is only relevant for UDP. If true, the message will be delivered as an RUDP message. |
|
inline |
Sends a message to a selected members of the room. It raises OnMemberMessage.
roomID | Room ID of the room that the message will be sent to. |
memberIDs | A list of member IDs to send the message to. |
message | Message to be sent. |
reliable | This parameter is only relevant for UDP. If true, the message will be delivered as an RUDP message. |
|
inlinevirtual |
Finds a list of rooms that have been registered with a type. Raises OnFindRoomsByType event.
roomType | A room type of find. |
limit | Maximum number of rooms to find by the given type. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Retrieves all chat messages as a list. OnChatLog will be raised.
|
inline |
Returns a last error payload of either Create, Join, JoinRandom, Leave etc.
|
inline |
Returns a last error message of either Create, Join, JoinRandom, Leave etc.
|
inlinevirtual |
Raises OnGetMemberIDs event and retrieves a list of member IDs and the room owner ID.
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Rasies OnGetNumberOfMembers event and retrieves number of a room. You may retrieve the number of members of a room that you are not part of as well.
|
inlinevirtual |
Get the owner user ID of the room. The method raises OnGetOwnerID event.
|
inlinevirtual |
Gets room properties created/replaced by UpdateProperties method. all property values are retrived as byte array. This raises OnGetProperties event.
roomID | Room ID of the properties to be retrieved. |
propNames | List of property names to be retrieved. |
|
inline |
Returns the room ID that the client has joined.
|
inlinevirtual |
Increments pre-created long type room property of the matching property name by given delta.
propName | Property name to increment. Property must be a type int64. |
delta | Incremenal value. If a negative value is given, it will subtruct instead. |
sync | If true, the change will be broadcasted to the other members of the room. This will raise OnIncrPropertySync event. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Joins a room. A client can NOT join more than one room at a time.
roomID | Room ID that the client will try to join. |
message | Message that will be sent to the other members of the room when the client joins the room. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Joins a random room if there is at lease room created by JoinRandom available. If not it will create a new room. If it does not find a room to join, it will instead create a new room.
maxMembers | Maximum number of clients allowed to join the room. |
ttl | TTL of the room when it is empty of members in seconds. |
message | Message that will be sent to the other members of the room when the client joins the room. |
allowEmpty | If true, the room will not be destroyed immediately when it is empty of clients. |
interval | Broadcast push interval in milliseconds. Default is 200ms. If 0 is given, broadcast packets will not be merged. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Leaves the room the client has joined.
message | Message that will be sent to the other members of the room when the client leaves the room. |
|
inlinevirtual |
Leaves the room the client has joined.
roomID | Room ID that the client will try to leave from. |
message | Message that will be sent to the other members of the room when the client leaves the room. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Sends a message to a selected members of the room. It raises OnMemberMessage.
memberIDs | A list of member IDs to send the message to. |
message | Message to be sent. |
reliable | This parameter is only relevant for UDP. If true, the message will be delivered as an RUDP message. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Sends a message to a selected members of the room.
roomID | Room ID of the room that the message will be sent to.
|
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Migrates a rooom that the user is currently in. This operation can only be performed by the owner of the room. When successful, the owner user raises OnConnect event with reconnect flag true. All members of the room will automatically join the new migrated room without sending join broadcast.
Reimplemented in Diarkis.Modules.WsRoom.
|
inline |
Leaves the room that the client is currently in and joins a new room. Raises OnLeave and OnJoin and remotely raises OnMemberLeave and OnMemberJoin. You may callback use the callback instead of listening to the regular events.
roomID | A room ID to join | ||||
leaveMessage | A byte array message to be broadcasted on leave.
|
|
inline |
Registers a callback on custom broadcast and/or message by ver and cmd. Must be callback AFTER group.SetupAsUdp or group.SetupAsTcp This is method is NOT compatible with Broadcast. Use with Message and/or Announce ONLY.
|
inlinevirtual |
Registers a room (the client is already a member of) with a type (used by FindRoomsByType). OnRegister event will be raised.
roomType | Room type to be used by FindRoomsByType. |
roomName | A name of the room registered. |
roomMetadata | Extra string data for the room registered. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inline |
Sends a message to all other members of the room except the sender.
message | Message data to be sent. |
reliable | This parameter is only relevant for UDP. If true, the message will be delivered as an RUDP message. |
|
inline |
Sends a message to all other members of the room except the sender.
message | Message data to be sent. |
reliable | This parameter is only relevant for UDP. If true, the message will be delivered as an RUDP message. |
|
inlinevirtual |
Reserves the spots for the users in the target room.
IMPORTANT: User making reservations must be a joined member of the room.
userIDs | List of user IDs to reserve the spots in the room. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Sends a chat message to the members of the room. All chat messages will be stored on the server and can be retrieved by GetChatLog. OnChatSyncResponse will be raised as the response from the server, and OnChatSyncwill be raised on the remote member clients as they receive the chat message.
message | A UTF8 encoded text message data to be sent as a chat message. |
|
inlineprotected |
Sets _createdTime manually.
|
inlineprotected |
Sets _roomID manually.
|
inline |
Sets room ID manually.
|
inline |
Changes the TCP instance for the room.
tcp | The new TCP instance. |
|
inline |
Changes the UDP instance for the room.
udp | The new UDP instance. |
|
inline |
Sets up the instance of as a TCP client.
tcp | An instance of Tcp |
|
inline |
Sets up the instance of as a UDP client.
udp | An instance of Udp |
|
inline |
Starts peer-to-peer comminucations with the remote clients in the same room. This method raises OnStartP2PSync event.
linkedClients | Number of clients to be linked directly via peer-to-peer. Other remote clients in the room will be linked via relay. |
|
inlinevirtual |
Retrieves all room objects with their names and values. OnSyncObjects event will be raised.
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Retrieve properties of the room. Raises OnPropertySync. Only properties with byte array value will be synchronized.
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Manipulates a room object by its name. Successful execution of the operation raises OnObjectUpdate event on all room members including itself. There are 3 modes to manipulate a room object:
mode | Decides which mode of manipluation to execute.
|
name | Name of the object. |
obj | The object is represented as a dictionary and its keys and values represent the properties of the object. // Object property as a dictionary
obj["x"] = 123.4;
obj["y"] = 567.8;
obj["hp"] = 300;
|
reliable | Flag to decided if the operation command packet will be RUDP or UDP. True will sewnd the packet as an RUDP packet. [IMPORTANT] This is only applicable with UDP client. |
Reimplemented in Diarkis.Modules.WsRoom.
|
inlinevirtual |
Creates/Replaces room properties by the given property names. The property values are stored as byte array and retrieved as such. This raises OnUpdateProperties event.
roomID | Room ID of create/replace its properties. |
props | Dictionary of room properties to be created/replaced. |
sync | If true, the updated properties will be synchronized by raising OnUpdatePropertySync event. |
Reimplemented in Diarkis.Modules.WsRoom.
byte [] Diarkis.Modules.Room._exclusiveHeader = new byte[4]{ 0xc, 0xa, 0xf, 0xe } |
When a message (Broadcast and Message) starts with _exclusiveHeader, OnMemberBroadcast and OnMemberMessage will not raise.
virtual ResponseHandler Diarkis.Modules.Room.OnCancelReservation |
The event raised as a server response of CancelReserve.
success | Indicates if the operation on the server was success or failure. |
msg | Error message byte array if success was false. |
virtual ChatLogHandler Diarkis.Modules.Room.OnChatLog |
Event raised when GetChatLog sends the history log of chat messages.
virtual ChatHandler Diarkis.Modules.Room.OnChatSync |
Event raised when a chat message from a remote member is received.
virtual ResponseHandler Diarkis.Modules.Room.OnChatSyncResponse |
Event raised when SendChatMessage is called.
virtual CreateHandler Diarkis.Modules.Room.OnCreate |
The event raised as a server response of Create.
success | Indicates if the operation on the server was success or failure. |
roomCreatedTime | Prepresents the server time of room creation in seconds. |
virtual FindRoomsHandler Diarkis.Modules.Room.OnFindRoomsByType |
The event raised as a server response of FindRoomByType.
success | Indicates if the operation on the server was success or failure. |
rooms | A list of rooms found. |
virtual GetMemberIDsHandler Diarkis.Modules.Room.OnGetMemberIDs |
The event raised as a server response of GetMemberIDs.
success | Indicates if the operation on the server was success or failure. |
ownerID | The room owner ID. |
memberIDs | An array of member IDs. |
virtual GetNumberOfMembersHandler Diarkis.Modules.Room.OnGetNumberOfMembers |
success | Indicates if the operation on the server was success or failure. |
roomID | The room ID. |
number | Number of current members. |
maxnumber | Maximum number of members allowed. |
virtual GetOwnerIDHandler Diarkis.Modules.Room.OnGetOwnerID |
The event raised as a server response of GetOwnerID.
success | Indicates if the operation on the server was success or failure. |
ownerID | The owner ID of the room that you are in. |
virtual GetPropsHandler Diarkis.Modules.Room.OnGetProperties |
The event raised as a server response of GetProperties.
success | Indicates if the operation on the server was success or failure. |
props | A dictionary that contains all requested room properties.. |
virtual IncrPropHandler Diarkis.Modules.Room.OnIncrProperty |
The event raised as a server response of IncrProperty.
success | Indicates if the operation on the server was success or failure. |
numProp | Updated property value. |
virtual IncrPropertySyncHandler Diarkis.Modules.Room.OnIncrPropertySync |
The event raised when a remote member client of the room successfully executes IncrPorperty.
numProp | Updated property value. |
virtual JoinHandler Diarkis.Modules.Room.OnJoin |
The event raised as a server response of Join.
`
success | Indicates if the operation on the server was success or failure. |
roomCreatedTime | Prepresents the server time of room creation in seconds. |
virtual LeaveHandler Diarkis.Modules.Room.OnLeave |
The event raised as a server response of Leave.
success | Indicates if the operation on the server was success or failure. |
virtual MessageHandler Diarkis.Modules.Room.OnMemberBroadcast |
The event is raised when a remote member client(s) of the room you are in sends a message via BroadcastTo.
message | A byte array message from a remote member client. |
virtual MessageHandler Diarkis.Modules.Room.OnMemberJoin |
The event raised when a remote client joins the room that you are in.
message | A message from the newly join remote client as a byte array. The message is the same message byte array sent from Join. |
virtual MessageHandler Diarkis.Modules.Room.OnMemberLeave |
The event is raised when a remote member of the room you are in leaves the room.
message | A message from the member client that has just left the room you are in. The message is the same message byte array sent from Leave. |
virtual MessageHandler Diarkis.Modules.Room.OnMemberMessage |
The event is raised when a remote member client(s) of the room you are in sends a message via MessageTo.
message | A byte array message from a remote member client. |
virtual ObjSyncHandler Diarkis.Modules.Room.OnObjectSync |
Event raised when SyncObjects is used as a response from the server. The event returns all room objects with their current values.
virtual ObjUpdateHandler Diarkis.Modules.Room.OnObjectUpdate |
Event raised when UpdateObject is used to manipulate a room object. Any member of the room may maniplulate room objects and the event is raised. The event passes down the manipulated room object along with its name and value with mode that was used. There are 3 modes of manipulations:
virtual GetOwnerIDHandler Diarkis.Modules.Room.OnOwnerChange |
Event raised when a new room owner has been elected by the server.
virtual PropertySyncHandler Diarkis.Modules.Room.OnPropertySync |
Event raised when SyncProperties is used to retrieve existing properties in the room. Only properties with byte array value will be synchronized.
virtual ResponseHandler Diarkis.Modules.Room.OnRegister |
The event raised as a server response of Register.
success | Indicates if the operation on the server was success or failure. |
msg | Error message byte array if success was false. |
MessageHandler Diarkis.Modules.Room.OnRelay |
The event raised when the client receives a relay message from another room member.
message | The relay message data. |
MessageHandler Diarkis.Modules.Room.OnRelayProfile |
The event raised when the client receives a relay profile message from another room member.
message | The relay message data. |
virtual ResponseHandler Diarkis.Modules.Room.OnReserve |
The event raised as a server response of Reserve.
success | Indicates if the operation on the server was success or failure. |
msg | Error message byte array if success was false. |
virtual P2PSyncHandler Diarkis.Modules.Room.OnStartP2PSync |
Event raised when StartP2PSync is successfully invoked. The event callback receives a list of remote clients to start peer-to-peer with.
virtual UpdatePropsHandler Diarkis.Modules.Room.OnUpdateProperties |
The event raised as a server response of UpdateProperties.
success | Indicates if the operation on the server was success or failure. |
props | The dictionary that contains update properties. |
GetPropsHandler Diarkis.Modules.Room.OnUpdatePropertySync |
The event raised when properties are updated with sync flag.