- attempt to add a client LAG checker to notify and disconnect clients that fall too far behind.

This commit is contained in:
Mark Vejvoda
2010-06-15 05:36:07 +00:00
parent b3b2d098b7
commit e091460f40
10 changed files with 157 additions and 80 deletions

View File

@@ -33,6 +33,7 @@ class ClientInterface: public GameNetworkInterface{
private:
static const int messageWaitTimeout;
static const int waitSleepTime;
static const int maxNetworkCommandListSendTimeWait;
private:
ClientSocket *clientSocket;
@@ -48,6 +49,9 @@ private:
Ip ip;
int port;
int currentFrameCount;
time_t lastNetworkCommandListSendTime;
public:
ClientInterface();
virtual ~ClientInterface();
@@ -88,6 +92,8 @@ public:
virtual bool getConnectHasHandshaked() const { return gotIntro; }
std::string getServerIpAddress();
int getCurrentFrameCount() const { return currentFrameCount; }
protected:
Mutex * getServerSynchAccessor() { return NULL; }