feat(net): add send message support to NetClient

This commit is contained in:
fallenoak committed 2023-03-23 17:01:27 -05:00
1 parent d35101546e
commit 0a35f03b29
2 files changed
+21

No files matched your search

+20
View File
@@ -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;
}
+1
View File
@@ -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);