Add new messages

This commit is contained in:
2023-02-21 11:42:14 +01:00
parent 7c8330465f
commit 7357062f92
5 changed files with 62 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ const socket = new WebSocket('ws://localhost:8080');
// Connection opened
socket.addEventListener('open', (event) => {
// Create a new room, and join it it immediately with the player name "player_name"
// The server will respond with a RoomCreated message which contains the room name
// The server will respond with a JoinedRoom message which contains the room name
socket.send(JSON.stringify({ CreateRoom: 'player_name' }));
});