|
R-Type
2
Doom but in better
|
The main UDP server that accepts client messages and updates the game logic. More...
#include <server.hpp>


Public Member Functions | |
| Server (asio::io_context &io, unsigned short port) | |
| Constructs the Server, binding a UDP socket to the specified port. | |
| GameManager & | getGameManager () |
| Accessor for the GameManager that manages multiple games. | |
| void | sendToClient (uint32_t clientId, const Message &msg) |
| Sends a Message to a specific client by ID (uses clientManager to find endpoint). | |
The main UDP server that accepts client messages and updates the game logic.
Definition at line 18 of file server.hpp.
| Server::Server | ( | asio::io_context & | io, |
| unsigned short | port ) |
Constructs the Server, binding a UDP socket to the specified port.
| io | The Asio io_context for async operations. |
| port | The UDP port for listening (e.g. 9000). |
Definition at line 4 of file server.cpp.
|
inline |
Accessor for the GameManager that manages multiple games.
Definition at line 31 of file server.hpp.
| void Server::sendToClient | ( | uint32_t | clientId, |
| const Message & | msg ) |
Sends a Message to a specific client by ID (uses clientManager to find endpoint).
| clientId | The unique ID of the client. |
| msg | The message to send. |
Definition at line 80 of file server.cpp.