The sender thread has been rewritten with a new algorithm in mind. The sender should not stall any more, and no timeout is required. There are no more send priorities.
The avatar manager no longer serializes access to avatar files.
This commit is contained in:
@@ -363,26 +363,6 @@ SessionManager::SendToAllSessions(SenderThread &sender, boost::shared_ptr<NetPac
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SessionManager::SendToAllSessionsLowPrio(SenderThread &sender, boost::shared_ptr<NetPacket> packet, SessionData::State state)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(m_sessionMapMutex);
|
||||
|
||||
SessionMap::iterator i = m_sessionMap.begin();
|
||||
SessionMap::iterator end = m_sessionMap.end();
|
||||
|
||||
while (i != end)
|
||||
{
|
||||
if (!i->second.sessionData.get())
|
||||
throw ServerException(__FILE__, __LINE__, ERR_NET_INVALID_SESSION, 0);
|
||||
|
||||
// Send each client (with a certain state) a copy of the packet.
|
||||
if (i->second.sessionData->GetState() == state)
|
||||
sender.SendLowPrio(i->second.sessionData, boost::shared_ptr<NetPacket>(packet->Clone()));
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SessionManager::SendToAllButOneSessions(SenderThread &sender, boost::shared_ptr<NetPacket> packet, SessionId except, SessionData::State state)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user