r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
srv::ClientSession Struct Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ClientSession()

srv::ClientSession::ClientSession ( )
inline

Default constructor.

Initializes a client session with default values

Definition at line 54 of file AsioServer.hpp.

Member Data Documentation

◆ clientCaps

std::uint32_t srv::ClientSession::clientCaps

Client capability flags (reserved)

Definition at line 44 of file AsioServer.hpp.

Referenced by srv::AsioServer::handleConnect().

◆ currentLobbyId

std::uint32_t srv::ClientSession::currentLobbyId

ID of joined lobby, 0 if not in lobby.

Definition at line 48 of file AsioServer.hpp.

◆ endpoint

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().

◆ isConnected

bool srv::ClientSession::isConnected

Connection state flag.

Definition at line 45 of file AsioServer.hpp.

Referenced by srv::AsioServer::handleConnect().

◆ lastPingSent

std::uint32_t srv::ClientSession::lastPingSent

Nonce of last PING packet sent.

Definition at line 46 of file AsioServer.hpp.

◆ lastSeen

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().

◆ latency

std::uint32_t srv::ClientSession::latency

Round-trip time in milliseconds.

Definition at line 47 of file AsioServer.hpp.

◆ playerName

std::string srv::ClientSession::playerName

Player's display name.

Definition at line 43 of file AsioServer.hpp.

Referenced by srv::AsioServer::handleConnect().

◆ sessionId

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().


The documentation for this struct was generated from the following file: