Represents an active client connection session. More...
#include <AsioServer.hpp>
Collaboration diagram for srv::ClientSession:Public Member Functions | |
| ClientSession () | |
| Default constructor. | |
Public Attributes | |
| std::uint32_t | sessionId |
| Unique session identifier assigned by server. | |
| asio::ip::udp::endpoint | endpoint |
| Client's network endpoint (IP:port) | |
| std::chrono::steady_clock::time_point | lastSeen |
| Timestamp of last received packet. | |
| std::string | playerName |
| Player's display name. | |
| std::uint32_t | clientCaps |
| Client capability flags (reserved) | |
| bool | isConnected |
| Connection state flag. | |
| std::uint32_t | lastPingSent |
| Nonce of last PING packet sent. | |
| std::uint32_t | latency |
| Round-trip time in milliseconds. | |
| std::uint32_t | currentLobbyId |
| ID of joined lobby, 0 if not in lobby. | |
Represents an active client connection session.
Stores all relevant information about a connected client including network endpoint, authentication state, latency metrics, and lobby membership.
Definition at line 38 of file AsioServer.hpp.
|
inline |
Default constructor.
Initializes a client session with default values
Definition at line 54 of file AsioServer.hpp.
| std::uint32_t srv::ClientSession::clientCaps |
Client capability flags (reserved)
Definition at line 44 of file AsioServer.hpp.
Referenced by srv::AsioServer::handleConnect().
| std::uint32_t srv::ClientSession::currentLobbyId |
ID of joined lobby, 0 if not in lobby.
Definition at line 48 of file AsioServer.hpp.
| asio::ip::udp::endpoint srv::ClientSession::endpoint |
Client's network endpoint (IP:port)
Definition at line 41 of file AsioServer.hpp.
Referenced by srv::AsioServer::handleConnect().
| bool srv::ClientSession::isConnected |
Connection state flag.
Definition at line 45 of file AsioServer.hpp.
Referenced by srv::AsioServer::handleConnect().
| std::uint32_t srv::ClientSession::lastPingSent |
Nonce of last PING packet sent.
Definition at line 46 of file AsioServer.hpp.
| std::chrono::steady_clock::time_point srv::ClientSession::lastSeen |
Timestamp of last received packet.
Definition at line 42 of file AsioServer.hpp.
Referenced by srv::AsioServer::handleConnect().
| std::uint32_t srv::ClientSession::latency |
Round-trip time in milliseconds.
Definition at line 47 of file AsioServer.hpp.
| std::string srv::ClientSession::playerName |
Player's display name.
Definition at line 43 of file AsioServer.hpp.
Referenced by srv::AsioServer::handleConnect().
| std::uint32_t srv::ClientSession::sessionId |
Unique session identifier assigned by server.
Definition at line 40 of file AsioServer.hpp.
Referenced by srv::AsioServer::handleConnect().