|
ndmspc v1.2.0-0.1.rc5
|
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. | |
| ULong_t | GetWsId () const |
| Get the WebSocket client ID. | |
| const std::string & | GetUsername () const |
| Get the username of the client. | |
| int | GetMessageCount () const |
| Get the message count for the client. | |
| std::chrono::system_clock::time_point | GetConnectedAt () const |
| Get the connection start time for the client. | |
| void | SetUsername (const std::string &username) |
| Set the username for the client. | |
| 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 | ( | ) |
Default constructor.
Definition at line 6 of file NWsClientInfo.cxx.
References fConnectedAt, fMessageCount, fUsername, and fWsId.
| 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.
References fConnectedAt, fMessageCount, fUsername, and fWsId.
| 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::IncrementMessageCount | ( | ) |
Increment the message count for the client.
Definition at line 45 of file NWsClientInfo.cxx.
References fMessageCount.
| 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.
|
private |
Connection start time.
Definition at line 21 of file NWsClientInfo.h.
Referenced by GetConnectedAt(), NWsClientInfo(), and NWsClientInfo().
|
private |
Number of messages sent/received.
Definition at line 20 of file NWsClientInfo.h.
Referenced by GetMessageCount(), IncrementMessageCount(), NWsClientInfo(), and NWsClientInfo().
|
private |
Username associated with the client.
Definition at line 19 of file NWsClientInfo.h.
Referenced by GetUsername(), NWsClientInfo(), NWsClientInfo(), and SetUsername().
|
private |
Unique WebSocket client ID.
Definition at line 18 of file NWsClientInfo.h.
Referenced by GetWsId(), NWsClientInfo(), and NWsClientInfo().