diff options
author | mtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-27 19:39:06 +0100 |
---|---|---|
committer | mtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-27 19:39:06 +0100 |
commit | 59af89235bfb9189dec1fcee40a9231d03690d27 (patch) | |
tree | c6eaa3c688d0969d6cf30d6c39d347094771fabd /source/cClientHandle.h | |
parent | I think I fixed the memory leaks in the converter (diff) | |
download | cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.gz cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.bz2 cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.lz cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.xz cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.zst cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cClientHandle.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/cClientHandle.h b/source/cClientHandle.h index 4f8981b78..abb0c14c6 100644 --- a/source/cClientHandle.h +++ b/source/cClientHandle.h @@ -54,7 +54,7 @@ public: static void AuthenticateThread( void* a_Param );
const char* GetUsername();
-
+
inline short GetPing() { return m_Ping; }
private:
void HandlePacket( cPacket* a_Packet );
@@ -71,8 +71,11 @@ private: float m_TimeLastPacket;
- // TODO: ping calculation per minecraft
short m_Ping;
+ int m_PingID;
+ long long m_PingStartTime;
+ long long m_LastPingTime;
+ static const unsigned short PING_TIME_MS = 1000; //minecraft sends 1 per 20 ticks (1 second or every 1000 ms)
bool m_bLoggedIn;
bool m_bSendLoginResponse;
|