24 lines
556 B
C++
24 lines
556 B
C++
#pragma once
|
|
|
|
class GameClient;
|
|
class GameClientMgr : public a8::Singleton<GameClientMgr>
|
|
{
|
|
private:
|
|
GameClientMgr() {};
|
|
friend class a8::Singleton<GameClientMgr>;
|
|
|
|
public:
|
|
|
|
void Init();
|
|
void UnInit();
|
|
|
|
void OnClientDisconnect(a8::XParams& param);
|
|
void OnTargetServerDisconnect(a8::XParams& param);
|
|
void OnTargetServerConnect(a8::XParams& param);
|
|
GameClient* GetGameClientBySocket(int sockhande);
|
|
void BindTargetConn(int socket_handle, int conn_instance_id);
|
|
|
|
private:
|
|
std::map<int, GameClient*> socket_hash_;
|
|
};
|