mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
WebSocketSession: Add connectedAt
This commit is contained in:
parent
1245958031
commit
0af2724ee9
@ -3,6 +3,7 @@
|
||||
#include "plugin-macros.generated.h"
|
||||
|
||||
WebSocketSession::WebSocketSession() :
|
||||
_connectedAt(0),
|
||||
_incomingMessages(0),
|
||||
_outgoingMessages(0),
|
||||
_encoding(0),
|
||||
@ -15,6 +16,16 @@ WebSocketSession::WebSocketSession() :
|
||||
{
|
||||
}
|
||||
|
||||
uint64_t WebSocketSession::ConnectedAt()
|
||||
{
|
||||
return _connectedAt.load();
|
||||
}
|
||||
|
||||
void WebSocketSession::SetConnectedAt(uint64_t at);
|
||||
{
|
||||
_connectedAt.store(at);
|
||||
}
|
||||
|
||||
uint64_t WebSocketSession::IncomingMessages()
|
||||
{
|
||||
return _incomingMessages.load();
|
||||
|
@ -9,6 +9,9 @@ class WebSocketSession
|
||||
public:
|
||||
WebSocketSession();
|
||||
|
||||
uint64_t ConnectedAt();
|
||||
void SetConnectedAt(uint64_t at);
|
||||
|
||||
uint64_t IncomingMessages();
|
||||
void IncrementIncomingMessages();
|
||||
|
||||
@ -37,6 +40,7 @@ class WebSocketSession
|
||||
void SetEventSubscriptions(uint64_t subscriptions);
|
||||
|
||||
private:
|
||||
std::atomic<uint64_t> _connectedAt;
|
||||
std::atomic<uint64_t> _incomingMessages;
|
||||
std::atomic<uint64_t> _outgoingMessages;
|
||||
std::atomic<uint8_t> _encoding;
|
||||
|
Loading…
Reference in New Issue
Block a user