This commit is contained in:
aozhiwei 2022-10-24 14:51:30 +08:00
parent 2a9b4bab79
commit 7274c4700e
2 changed files with 19 additions and 0 deletions

View File

@ -9,6 +9,19 @@
void MatchPool::Init()
{
a8::Timer::Instance()->AddRepeatTimerAndAttach
(1000,
a8::XParams()
.SetSender(this),
[] (const a8::XParams& param)
{
MatchPool::Instance()->Update();
},
&timer_attacher_.timer_list_,
[] (const a8::XParams& param)
{
}
);
}
void MatchPool::UnInit()
@ -64,3 +77,8 @@ void MatchPool::RemoveSocket(int socket_handle)
socket_hash_.erase(itr);
}
}
void MatchPool::Update()
{
}

View File

@ -27,6 +27,7 @@ private:
std::tuple<std::string, MatchTeamNew*>* GetMatchInfo(int socket_handle);
void RemoveTeam(const std::string& team_uuid);
void RemoveSocket(int socket_handle);
void Update();
private:
a8::TimerAttacher timer_attacher_;