Represents a game lobby (room) where players gather before starting a game. More...
#include <AsioServer.hpp>
Collaboration diagram for srv::Lobby:Public Member Functions | |
| Lobby () | |
| Default constructor. | |
| Lobby (std::uint32_t id, const std::string &name, std::uint32_t host, std::uint8_t max, std::uint8_t mode) | |
| Parameterized constructor. | |
Public Attributes | |
| std::uint32_t | lobbyId |
| Unique lobby identifier. | |
| std::string | lobbyName |
| Human-readable lobby name. | |
| std::uint32_t | hostSessionId |
| Session ID of the lobby host. | |
| std::vector< std::uint32_t > | playerSessions |
| List of player session IDs in this lobby. | |
| std::uint8_t | maxPlayers |
| Maximum number of players allowed (1-8) | |
| std::uint8_t | gameMode |
| Game mode identifier. | |
| rnp::LobbyStatus | status |
| Current lobby status. | |
| std::chrono::steady_clock::time_point | createdTime |
| Timestamp when lobby was created. | |
Represents a game lobby (room) where players gather before starting a game.
Contains all lobby metadata including players, host, game mode, and status. Lobbies are managed by the server and synchronized across all members.
Definition at line 82 of file AsioServer.hpp.
|
inline |
Default constructor.
Creates an empty lobby with default values
Definition at line 97 of file AsioServer.hpp.
|
inline |
Parameterized constructor.
| id | Unique lobby identifier |
| name | Lobby display name |
| host | Session ID of the host player |
| max | Maximum number of players (1-8) |
| mode | Game mode identifier |
Definition at line 111 of file AsioServer.hpp.
| std::chrono::steady_clock::time_point srv::Lobby::createdTime |
Timestamp when lobby was created.
Definition at line 91 of file AsioServer.hpp.
| std::uint8_t srv::Lobby::gameMode |
Game mode identifier.
Definition at line 89 of file AsioServer.hpp.
Referenced by srv::AsioServer::lobbyToLobbyInfo().
| std::uint32_t srv::Lobby::hostSessionId |
Session ID of the lobby host.
Definition at line 86 of file AsioServer.hpp.
Referenced by srv::AsioServer::lobbyToLobbyInfo().
| std::uint32_t srv::Lobby::lobbyId |
Unique lobby identifier.
Definition at line 84 of file AsioServer.hpp.
Referenced by srv::AsioServer::lobbyToLobbyInfo().
| std::string srv::Lobby::lobbyName |
Human-readable lobby name.
Definition at line 85 of file AsioServer.hpp.
Referenced by srv::AsioServer::lobbyToLobbyInfo().
| std::uint8_t srv::Lobby::maxPlayers |
Maximum number of players allowed (1-8)
Definition at line 88 of file AsioServer.hpp.
Referenced by srv::AsioServer::joinLobby(), and srv::AsioServer::lobbyToLobbyInfo().
| std::vector<std::uint32_t> srv::Lobby::playerSessions |
List of player session IDs in this lobby.
Definition at line 87 of file AsioServer.hpp.
Referenced by srv::AsioServer::createLobby(), srv::AsioServer::joinLobby(), and srv::AsioServer::lobbyToLobbyInfo().
| rnp::LobbyStatus srv::Lobby::status |
Current lobby status.
Definition at line 90 of file AsioServer.hpp.
Referenced by srv::AsioServer::joinLobby(), and srv::AsioServer::lobbyToLobbyInfo().