mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-16 01:55:21 +03:00
chore(net): clean up member visibility in NetClient
This commit is contained in:
parent
5e2c1e7769
commit
431ed626c9
@ -26,7 +26,7 @@ void ClientServices::ConnectToSelectedServer() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ClientServices::Connection()->m_netState != NS_INITIALIZED) {
|
||||
if (ClientServices::Connection()->GetState() != NS_INITIALIZED) {
|
||||
ClientServices::Connection()->SetStatus(0, 39);
|
||||
return;
|
||||
}
|
||||
|
@ -170,6 +170,10 @@ bool NetClient::GetDelete() {
|
||||
return this->m_deleteMe;
|
||||
}
|
||||
|
||||
NETSTATE NetClient::GetState() {
|
||||
return this->m_netState;
|
||||
}
|
||||
|
||||
int32_t NetClient::HandleCantConnect() {
|
||||
// TODO
|
||||
return 1;
|
||||
|
@ -47,6 +47,34 @@ class NETEVENTQUEUE {
|
||||
|
||||
class NetClient : public WowConnectionResponse {
|
||||
public:
|
||||
// Virtual member functions
|
||||
virtual void WCMessageReady(WowConnection* conn, uint32_t timeStamp, CDataStore* msg);
|
||||
virtual void WCConnected(WowConnection* conn, WowConnection* inbound, uint32_t timeStamp, const NETCONNADDR* addr);
|
||||
virtual void WCCantConnect(WowConnection* conn, uint32_t timeStamp, NETCONNADDR* addr);
|
||||
virtual void WCDisconnected(WowConnection* conn, uint32_t timeStamp, NETCONNADDR* addr);
|
||||
virtual int32_t HandleData(uint32_t timeReceived, void* data, int32_t size);
|
||||
virtual int32_t HandleAuthChallenge(AuthenticationChallenge* challenge) = 0;
|
||||
virtual int32_t HandleConnect();
|
||||
virtual int32_t HandleDisconnect();
|
||||
virtual int32_t HandleCantConnect();
|
||||
|
||||
// Member functions
|
||||
void AddRef();
|
||||
void AuthChallengeHandler(WowConnection* conn, CDataStore* msg);
|
||||
void Connect(const char* addrStr);
|
||||
int32_t ConnectInternal(const char* host, uint16_t port);
|
||||
void DelRef();
|
||||
bool GetDelete();
|
||||
NETSTATE GetState();
|
||||
void HandleIdle();
|
||||
int32_t Initialize();
|
||||
void PollEventQueue();
|
||||
void PongHandler(WowConnection* conn, CDataStore* msg);
|
||||
void SetDelete();
|
||||
void SetLoginData(LoginData* loginData);
|
||||
void SetMessageHandler(NETMESSAGE msgId, MESSAGE_HANDLER handler, void* param);
|
||||
|
||||
private:
|
||||
// Static variables
|
||||
static int32_t s_clientCount;
|
||||
|
||||
@ -67,32 +95,6 @@ class NetClient : public WowConnectionResponse {
|
||||
uint32_t m_latencyStart;
|
||||
uint32_t m_latencyEnd;
|
||||
SCritSect m_pingLock;
|
||||
|
||||
// Virtual member functions
|
||||
virtual void WCMessageReady(WowConnection* conn, uint32_t timeStamp, CDataStore* msg);
|
||||
virtual void WCConnected(WowConnection* conn, WowConnection* inbound, uint32_t timeStamp, const NETCONNADDR* addr);
|
||||
virtual void WCCantConnect(WowConnection* conn, uint32_t timeStamp, NETCONNADDR* addr);
|
||||
virtual void WCDisconnected(WowConnection* conn, uint32_t timeStamp, NETCONNADDR* addr);
|
||||
virtual int32_t HandleData(uint32_t timeReceived, void* data, int32_t size);
|
||||
virtual int32_t HandleAuthChallenge(AuthenticationChallenge* challenge) = 0;
|
||||
virtual int32_t HandleConnect();
|
||||
virtual int32_t HandleDisconnect();
|
||||
virtual int32_t HandleCantConnect();
|
||||
|
||||
// Member functions
|
||||
void AddRef();
|
||||
void AuthChallengeHandler(WowConnection* conn, CDataStore* msg);
|
||||
void Connect(const char* addrStr);
|
||||
int32_t ConnectInternal(const char* host, uint16_t port);
|
||||
void DelRef();
|
||||
bool GetDelete();
|
||||
void HandleIdle();
|
||||
int32_t Initialize();
|
||||
void PollEventQueue();
|
||||
void PongHandler(WowConnection* conn, CDataStore* msg);
|
||||
void SetDelete();
|
||||
void SetLoginData(LoginData* loginData);
|
||||
void SetMessageHandler(NETMESSAGE msgId, MESSAGE_HANDLER handler, void* param);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user