mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 08:42:45 +03:00
feat(net): implement GruntLogin::Reconnect
This commit is contained in:
parent
eccd46684f
commit
f97bf4a876
@ -510,7 +510,7 @@ int32_t Grunt::ClientLink::CmdXferInitiate(CDataStore& msg) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Grunt::ClientLink::Connect(const char* a2) {
|
void Grunt::ClientLink::Connect(const char* loginServer) {
|
||||||
if (this->m_state) {
|
if (this->m_state) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -523,11 +523,11 @@ void Grunt::ClientLink::Connect(const char* a2) {
|
|||||||
this->m_connection = connection;
|
this->m_connection = connection;
|
||||||
this->m_connection->SetType(WOWC_TYPE_STREAM);
|
this->m_connection->SetType(WOWC_TYPE_STREAM);
|
||||||
|
|
||||||
auto port = SStrChr(a2, ':');
|
auto port = SStrChr(loginServer, ':');
|
||||||
if (port) {
|
if (port) {
|
||||||
this->m_connection->Connect(a2, 5000);
|
this->m_connection->Connect(loginServer, 5000);
|
||||||
} else {
|
} else {
|
||||||
this->m_connection->Connect(a2, 3724, 5000);
|
this->m_connection->Connect(loginServer, 3724, 5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -79,7 +79,7 @@ class Grunt::ClientLink : public WowConnectionResponse, Grunt::Pending, Grunt::T
|
|||||||
int32_t CmdRealmList(CDataStore& msg);
|
int32_t CmdRealmList(CDataStore& msg);
|
||||||
int32_t CmdXferData(CDataStore& msg);
|
int32_t CmdXferData(CDataStore& msg);
|
||||||
int32_t CmdXferInitiate(CDataStore& msg);
|
int32_t CmdXferInitiate(CDataStore& msg);
|
||||||
void Connect(const char* a2);
|
void Connect(const char* loginServer);
|
||||||
void Disconnect();
|
void Disconnect();
|
||||||
void GetRealmList();
|
void GetRealmList();
|
||||||
void LogonNewSession(const Logon& logon);
|
void LogonNewSession(const Logon& logon);
|
||||||
|
|||||||
@ -291,7 +291,9 @@ void GruntLogin::ProveVersion(const uint8_t* versionChecksum) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GruntLogin::Reconnect() {
|
void GruntLogin::Reconnect() {
|
||||||
// TODO
|
this->m_reconnect = true;
|
||||||
|
|
||||||
|
this->m_clientLink->Connect(this->m_loginResponse->GetLoginServer());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GruntLogin::ReconnectResult(Grunt::Result result, const uint8_t* sessionKey, uint32_t sessionKeyLen, uint16_t flags) {
|
void GruntLogin::ReconnectResult(Grunt::Result result, const uint8_t* sessionKey, uint32_t sessionKeyLen, uint16_t flags) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user