mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-17 05:02:29 +00:00
feat(client): handle successful authentication in ClientServices
This commit is contained in:
parent
9fe2e2e8ff
commit
5355b75768
10 changed files with 60 additions and 0 deletions
|
|
@ -44,6 +44,10 @@ int32_t NetClient::Initialize() {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void NetClient::SetLoginData(LoginData* loginData) {
|
||||
memcpy(&this->m_loginData, loginData, sizeof(this->m_loginData));
|
||||
}
|
||||
|
||||
void NetClient::SetMessageHandler(NETMESSAGE msgId, MESSAGE_HANDLER handler, void* param) {
|
||||
this->m_handlers[msgId] = handler;
|
||||
this->m_handlerParams[msgId] = param;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ class NetClient : public WowConnectionResponse {
|
|||
static int32_t s_clientCount;
|
||||
|
||||
// Member variables
|
||||
LoginData m_loginData;
|
||||
NETSTATE m_netState = NS_UNINITIALIZED;
|
||||
MESSAGE_HANDLER m_handlers[NUM_MSG_TYPES];
|
||||
void* m_handlerParams[NUM_MSG_TYPES];
|
||||
|
|
@ -50,6 +51,7 @@ class NetClient : public WowConnectionResponse {
|
|||
|
||||
// Member functions
|
||||
int32_t Initialize();
|
||||
void SetLoginData(LoginData* loginData);
|
||||
void SetMessageHandler(NETMESSAGE msgId, MESSAGE_HANDLER handler, void* param);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue