From 34bcb5c1346f8c85e1fcf15a77c29afb646e6ae6 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sun, 26 Feb 2023 13:09:39 -0600 Subject: [PATCH] feat(net): handle remaining logic in NetClient:WCConnected --- src/net/connection/NetClient.cpp | 5 +++-- src/net/connection/NetClient.hpp | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/net/connection/NetClient.cpp b/src/net/connection/NetClient.cpp index c2e0092..bdd613b 100644 --- a/src/net/connection/NetClient.cpp +++ b/src/net/connection/NetClient.cpp @@ -264,8 +264,9 @@ void NetClient::WCConnected(WowConnection* conn, WowConnection* inbound, uint32_ this->m_pingLock.Enter(); - // TODO - + this->m_connectedTimestamp = timeStamp; + this->m_bytesReceived = 0; + this->m_bytesSent = 0; this->m_latencyStart = 0; this->m_latencyEnd = 0; this->m_pingSent = OsGetAsyncTimeMsPrecise(); diff --git a/src/net/connection/NetClient.hpp b/src/net/connection/NetClient.hpp index 56bbc54..34a9a20 100644 --- a/src/net/connection/NetClient.hpp +++ b/src/net/connection/NetClient.hpp @@ -94,6 +94,9 @@ class NetClient : public WowConnectionResponse { uint32_t m_latency[16]; uint32_t m_latencyStart; uint32_t m_latencyEnd; + uint32_t m_bytesSent = 0; + uint32_t m_bytesReceived = 0; + uint32_t m_connectedTimestamp = 0; SCritSect m_pingLock; };