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
+4 -4
View File
@@ -22,10 +22,10 @@
#define _CLIENTTHREAD_H_
#include <boost/shared_ptr.hpp>
#include <boost/asio.hpp>
#include <string>
#include <core/thread.h>
#include <net/senderinterface.h>
#include <guiinterface.h>
#include <serverdata.h>
#include <playerdata.h>
@@ -33,7 +33,7 @@
class ClientContext;
class ClientState;
class SenderThread;
class SenderHelper;
class ReceiverHelper;
class DownloaderThread;
class ClientSenderCallback;
@@ -127,6 +127,7 @@ protected:
ClientState &GetState();
void SetState(ClientState &newState);
SenderHelper &GetSender();
ReceiverHelper &GetReceiver();
void SetGameId(unsigned id);
@@ -191,6 +192,7 @@ private:
GuiInterface &m_gui;
AvatarManager &m_avatarManager;
boost::shared_ptr<SenderHelper> m_senderHelper;
boost::shared_ptr<ReceiverHelper> m_receiver;
boost::shared_ptr<DownloaderThread> m_avatarDownloader;
@@ -233,8 +235,6 @@ private:
mutable boost::mutex m_curStatsMutex;
ServerStats m_curStats;
boost::shared_ptr<SenderInterface> m_senderHelper;
friend class AbstractClientStateReceiving;
friend class ClientStateInit;
friend class ClientStateStartResolve;