diff --git a/src/net/connection/NetClient.cpp b/src/net/connection/NetClient.cpp index bdd613b..788509e 100644 --- a/src/net/connection/NetClient.cpp +++ b/src/net/connection/NetClient.cpp @@ -240,6 +240,26 @@ void NetClient::PongHandler(WowConnection* conn, CDataStore* msg) { // TODO } +void NetClient::Send(CDataStore* msg) { + if (this->m_netState != NS_CONNECTED) { + return; + } + + auto v4 = msg->m_size - msg->m_read; + + if (!v4) { + return; + } + + if (this->m_suspended) { + // TODO + } else { + this->m_serverConnection->Send(msg, 0); + + // TODO + } +} + void NetClient::SetDelete() { this->m_deleteMe = true; } diff --git a/src/net/connection/NetClient.hpp b/src/net/connection/NetClient.hpp index 34a9a20..70427bb 100644 --- a/src/net/connection/NetClient.hpp +++ b/src/net/connection/NetClient.hpp @@ -70,6 +70,7 @@ class NetClient : public WowConnectionResponse { int32_t Initialize(); void PollEventQueue(); void PongHandler(WowConnection* conn, CDataStore* msg); + void Send(CDataStore* msg); void SetDelete(); void SetLoginData(LoginData* loginData); void SetMessageHandler(NETMESSAGE msgId, MESSAGE_HANDLER handler, void* param);