Core: Implemented IPC (Inter-process communication) between worldserver and bnetserver using ZeroMQ library.
* Implemented ToonReady and ToonLoggedOut battle.net packets
This commit is contained in:
1 parent
40cff79b25
commit
f773a9e053
72 files changed
+4922
-68
No files matched your search
@@ -49,3 +49,22 @@ void Battlenet::SessionManager::RemoveSession(Session* session)
|
||||
_sessions.erase({ session->GetAccountId(), session->GetGameAccountId() });
|
||||
_sessionsByAccountId[session->GetAccountId()].remove(session);
|
||||
}
|
||||
|
||||
Battlenet::Session* Battlenet::SessionManager::GetSession(uint32 accountId, uint32 gameAccountId) const
|
||||
{
|
||||
auto itr = _sessions.find({ accountId, gameAccountId });
|
||||
if (itr != _sessions.end())
|
||||
return itr->second;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::list<Battlenet::Session*> Battlenet::SessionManager::GetSessions(uint32 accountId) const
|
||||
{
|
||||
std::list<Session*> sessions;
|
||||
auto itr = _sessionsByAccountId.find(accountId);
|
||||
if (itr != _sessionsByAccountId.end())
|
||||
sessions = itr->second;
|
||||
|
||||
return sessions;
|
||||
}
|
||||
Reference in new issue
Block a user