Add new messages
This commit is contained in:
@@ -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' }));
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user