|
ndmspc
v1.2.0-0.1.rc3
|
Holds per-client data for WebSocket connections. More...
#include <NWsClientInfo.h>
Public Member Functions | |
| NWsClientInfo () | |
| Default constructor. | |
| NWsClientInfo (ULong_t id, const std::string &username) | |
| Constructor with initial values. More... | |
| ULong_t | GetWsId () const |
| Get the WebSocket client ID. More... | |
| const std::string & | GetUsername () const |
| Get the username of the client. More... | |
| int | GetMessageCount () const |
| Get the message count for the client. More... | |
| std::chrono::system_clock::time_point | GetConnectedAt () const |
| Get the connection start time for the client. More... | |
| void | SetUsername (const std::string &username) |
| Set the username for the client. More... | |
| void | IncrementMessageCount () |
| Increment the message count for the client. | |
Private Attributes | |
| ULong_t | fWsId |
| Unique WebSocket client ID. | |
| std::string | fUsername |
| Username associated with the client. | |
| int | fMessageCount |
| Number of messages sent/received. | |
| std::chrono::system_clock::time_point | fConnectedAt |
| Connection start time. | |
Holds per-client data for WebSocket connections.
Stores client ID, username, and message count for tracking individual clients.
Definition at line 16 of file NWsClientInfo.h.
| Ndmspc::NWsClientInfo::NWsClientInfo | ( | ULong_t | id, |
| const std::string & | username | ||
| ) |
Constructor with initial values.
| id | WebSocket client ID. |
| username | Username for the client. |
Definition at line 12 of file NWsClientInfo.cxx.
| std::chrono::system_clock::time_point Ndmspc::NWsClientInfo::GetConnectedAt | ( | ) | const |
Get the connection start time for the client.
Definition at line 31 of file NWsClientInfo.cxx.
References fConnectedAt.
| int Ndmspc::NWsClientInfo::GetMessageCount | ( | ) | const |
Get the message count for the client.
Definition at line 26 of file NWsClientInfo.cxx.
References fMessageCount.
| const std::string & Ndmspc::NWsClientInfo::GetUsername | ( | ) | const |
Get the username of the client.
Definition at line 22 of file NWsClientInfo.cxx.
References fUsername.
| ULong_t Ndmspc::NWsClientInfo::GetWsId | ( | ) | const |
Get the WebSocket client ID.
Definition at line 18 of file NWsClientInfo.cxx.
References fWsId.
| void Ndmspc::NWsClientInfo::SetUsername | ( | const std::string & | username | ) |
Set the username for the client.
| username | New username. |
Definition at line 38 of file NWsClientInfo.cxx.
References fUsername.