Let's start two test clients and create/join a room.
Create a room with one client using the room create command, then join the room with the other client using the room join command.
Creating a Room with uid: test1
> room createWhichclienttocreatearoom? [tcp/udp] > udp[UID: test1][SID(UDP): xxxx][RoomID: yyyy]> New member joined room - Hello from test2
Joining a Room with uid: test2
> room join
Which client to join a room? [tcp/udp] udp
Type room ID > yyyy
handleOnJoinRoom
UDP Room yyyy joined - success true and it was created at 1728033877
New member joined room - Hello from test2
[UID: test2][SID(UDP): zzzz][RoomID: yyyy]
Checking CCU and Room Count with ms
You can verify that the CCU and room count have increased by having two test clients join the room.
You can issue the room broadcast command to send any message.
You can also achieve the same with the shorthand room +.
Broadcasting with uid: test1
> room broadcast
Which client to broadcast to a room? [tcp/udp] udp
Type room ID: yyyy
Type message: Hello, Diarkis!!
Room broadcast - Hello, Diarkis!!
[UID: test1][SID(UDP): xxxx][RoomID: yyyy]
You can issue the room leave command to exit a room.
[UID: test1][SID(UDP): xxxx][RoomID: yyyy]
> room leave
Which client to leave a room? [tcp/udp]
udp
Type room ID:
yyyy
Room left. success:true
[UID: test1][SID(UDP): xxxx]
Checking Test Client Commands
You can confirm the list of available commands with the help command.
By putting a module name as an argument like help room, you can narrow down the list to specific modules.
> help
================ Command List ================
help - Display the list of valid commands
help {module name} - Display the list of valid commands for the module
reconnect - Reconnects to another server
disconnect - Disconnects
ph - Sends a TCP Hey
h - Sends a UDP Hello
rh - Sends an RUDP Hello
die - Ungraceful disconnect from the server
:
=============================================
> help room
================ Command List ================
room create - Creates a room
room join - Joins a room
room join random - Joins a random room or creates a new room
room leave - Leaves a room
room get owner - Get a room owner id
room get members - Get a room member ids
room get num - Get a number of room members
room migrate - Migrates a room to another server
room message - Sends a message to one selected member of the room
room broadcast - Reliable broadcast to a room
room + - Alias for `room broadcast`
room ubroadcast - Unreliable broadcast to a room
room - - Alias for `room ubroadcast`
room p2p - Starts P2P with room members
room relay - Sends a relay message to other room members
room relay to - Sends a relay message to selected room members
room relay profile - Sends a relay profile
room relay to profile - Sends a relay profile to selected room members
room props update - Update room property
room props get - Get room property
room props incr - Increment room property
room props sync - Sync room property
room reserve - Reserves a room
room cancel reservation - Cancel a room reservation
room register - Registers a room with a type
room find - Finds rooms by type
room obj incr - Increment room objects
room obj delete - Delete room objects
room obj update - Update room objects
room chat - Chat in a room
room chat log - Get chat log in a room
=============================================