RoomConnections
This code defines a class called RoomConnections
. This class is used to handle events related to network connections. In particular, it handles events such as room creation, joining, and leaving.
Members
Server Side Events: This section defines events that may occur on the server side.
OnServerCreateRoom
: The room creation process is triggered on the server.OnServerJoinRoom
: The process of joining the room is triggered on the server.OnServerExitRoom
: Triggered on the server to exit the room.
Client Side Events: This section defines events that may occur on the client side.
OnClientRoomListAdd
: It is called from the client to add it to the room list.OnClientRoomListUpdate
: Called from the client to update the room listOnClientRoomListRemove
: Called from the client to delete from the room listOnClientConnectionMessage
: Called from the client to return the connection idOnClientCreatedRoom
: It is called from the client when the room is createdOnClientJoinedRoom
: It is called from the client when it joins the room.OnClientRemovedRoom
: Called from the client when the room is deletedOnClientExitedRoom
: Called from the client when leaving the roomOnClientFailedRoom
: It is called from the client when there is an error regarding the room.
Methods
This method records events to be used on the server side.
For example, it causes the
OnReceivedRoomMessageViaServer
method to be run when the server creates a room.
This method records events to be used on the client side.
For example, it causes the
OnReceivedRoomMessageViaClient
method to be invoked when a client joins a room.
This method works when the room list changes on the client side.
It triggers the
OnClientRoomListAdd
event if a new room is added, theOnClientRoomListUpdate
event if the room is updated, and theOnClientRoomListRemove
event if the room is removed.
This method works when a connection message is received on the client side.
Triggers the
OnClientRoomIDMessage
event.
This method works when a connection message is received on the client side.
Triggers the
OnClientConnectionMessage
event.
This method works when a room message is received on the server side.
Triggers the relevant event based on the type of message.
This method works when a room message is received on the client side.
Triggers the relevant event based on the type of message.
Last updated