This commit is contained in:
aozhiwei 2019-05-22 17:55:32 +08:00
parent 885f021b24
commit e369305fbe
2 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,11 @@ void PlayerMgr::UnInit()
{
}
int PlayerMgr::GetPlayerNum()
{
return socket_hash_.size();
}
Player* PlayerMgr::GetPlayerBySocket(int socket)
{
auto itr = socket_hash_.find(socket);

View File

@ -19,6 +19,7 @@ class PlayerMgr : public a8::Singleton<PlayerMgr>
void Init();
void UnInit();
int GetPlayerNum();
Player* GetPlayerBySocket(int socket);
Player* CreatePlayerByCMJoin(int socket, const cs::CMJoin& msg);