feat(net): handle connect callback in client connection

This commit is contained in:
fallenoak 2023-04-04 00:28:12 -05:00
parent 1b27761d0c
commit 55a3bacbd0
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 13 additions and 0 deletions

View File

@ -163,6 +163,16 @@ int32_t ClientConnection::Disconnect() {
return 0;
}
int32_t ClientConnection::HandleConnect() {
this->Complete(1, 5);
this->m_connected = 1;
// TODO WardenClient_Initialize();
return this->NetClient::HandleConnect();
}
void ClientConnection::Initiate(WOWCS_OPS op, int32_t errorCode, void (*cleanup)()) {
this->m_cleanup = cleanup;
this->m_statusCop = op;

View File

@ -16,6 +16,9 @@ class ClientConnection : public RealmConnection {
int32_t m_errorCode = 0;
void (*m_cleanup)() = nullptr;
// Virtual member functions
virtual int32_t HandleConnect();
// Member functions
ClientConnection(RealmResponse* realmResponse)
: RealmConnection(realmResponse)