Rewriting sender yet again to fit the new asio design. Polling for new send data is no longer needed, this also reduces lag.

This commit is contained in:
lotodore
2009-06-07 08:51:43 +00:00
parent 9e50969bdc
commit 5f3369432a
14 changed files with 187 additions and 269 deletions
+1 -10
View File
@@ -18,15 +18,12 @@
***************************************************************************/
#include <net/sessiondata.h>
#include <net/senderinterface.h>
SessionData::SessionData(boost::shared_ptr<boost::asio::ip::tcp::socket> sock, SessionId id,
boost::shared_ptr<SenderInterface> sender, SessionDataCallback &cb)
SessionData::SessionData(boost::shared_ptr<boost::asio::ip::tcp::socket> sock, SessionId id, SessionDataCallback &cb)
: m_socket(sock), m_id(id), m_gameId(0), m_state(SessionData::Init), m_readyFlag(false),
m_wantsLobbyMsg(true), m_activityTimeoutNoticeSent(false), m_callback(cb),
m_maxNumPlayers(0)
{
m_sender = sender;
}
SessionData::~SessionData()
@@ -144,12 +141,6 @@ SessionData::GetReceiveBuffer()
return m_receiveBuffer;
}
SenderInterface &
SessionData::GetSender()
{
return *m_sender;
}
void
SessionData::ResetActivityTimer()
{