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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user