From 75982f4091eafedf1c64ac64884a7e65be3bfe51 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 21 Feb 2023 11:22:38 -0600 Subject: [PATCH] feat(net): add message buffer fields to WowConnection --- src/net/connection/WowConnection.cpp | 6 ++++++ src/net/connection/WowConnection.hpp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/net/connection/WowConnection.cpp b/src/net/connection/WowConnection.cpp index 7b51ae7..810f591 100644 --- a/src/net/connection/WowConnection.cpp +++ b/src/net/connection/WowConnection.cpp @@ -462,6 +462,12 @@ void WowConnection::Init(WowConnectionResponse* response, void (*func)(void)) { // TODO + this->m_readBuffer = nullptr; + this->m_readBytes = 0; + this->m_readBufferSize = 0; + + // TODO + this->SetState(WOWC_INITIALIZED); this->m_type = WOWC_TYPE_MESSAGES; } diff --git a/src/net/connection/WowConnection.hpp b/src/net/connection/WowConnection.hpp index ec521da..0181054 100644 --- a/src/net/connection/WowConnection.hpp +++ b/src/net/connection/WowConnection.hpp @@ -44,6 +44,9 @@ class WowConnection { int32_t m_sock; WOW_CONN_STATE m_connState; WowConnectionResponse* m_response; + uint8_t* m_readBuffer; + int32_t m_readBytes; + int32_t m_readBufferSize; uint32_t m_connectAddress; uint16_t m_connectPort; NETCONNADDR m_peer;