In-game Server Structure
Description of the in-game server's structure.
Connect to the in-game server
The in-game server provides a function for matched users to exchange messages between themselves in real time.
A user can start the game by connecting to the matching server and game room in the following order.
1. Connect to the in-game server
Connect to the in-game server using the in-game server address and port number received when the matching was established.
2. Connect to the game room
Connect to the game room using the game room token value received when the matching was established.
At this time, a list of currently participating users and the game room connection success message are also received.
3. Start the game
When all other users matched with you connect to the game room, the game start message will be sent to all clients after the game start waiting time defined in the console passes.
Proceed with the game
1. Exchange binary data / chat message
Once the game start message is delivered, you can send the binary data and chat messages.
Data sent to the server will be broadcasted to all users in the game room, including the user who sent that data.
2. Send the game result
If all users in the game room send a game result message to the server, the server will compile the result based on the messages and reflect it in the DB.
3. End the game
The game ends as soon as the game result is compiled.
Once the game ends, the user is automatically disconnected from the in-game server.