Cleaning up the different timeouts and how players can be removed from the game.

This commit is contained in:
lotodore
2011-12-11 14:54:17 +00:00
parent 110a9536f4
commit aad9e271db
16 changed files with 175 additions and 167 deletions
+12
View File
@@ -68,6 +68,18 @@ SenderHelper::Send(boost::shared_ptr<SessionData> session, const NetPacketList &
}
}
void
SenderHelper::SetCloseAfterSend(boost::shared_ptr<SessionData> session)
{
SendBuffer &tmpBuffer = session->GetSendBuffer();
// Add packet to specific queue.
boost::mutex::scoped_lock lock(tmpBuffer.dataMutex);
// Mark that the socket should be closed after the send operation.
tmpBuffer.SetCloseAfterSend();
// Activate async send, if needed.
tmpBuffer.AsyncSendNextPacket(session->GetAsioSocket());
}
void
SenderHelper::InternalStorePacket(SendBuffer &tmpBuffer, boost::shared_ptr<NetPacket> packet)
{