Add server statistics which are sent by the server to every client each time they change.

This commit is contained in:
lotodore
2007-10-20 22:22:11 +00:00
parent c5246aaef3
commit 4bc57f07d0
21 changed files with 302 additions and 3 deletions
+6
View File
@@ -67,6 +67,7 @@ public:
GameInfo GetGameInfo(unsigned playerId) const;
PlayerInfo GetPlayerInfo(unsigned playerId) const;
ServerStats GetStatData() const;
ClientCallback &GetCallback();
GuiInterface &GetGui();
@@ -134,6 +135,8 @@ protected:
void ModifyGameInfoRemovePlayer(unsigned gameId, unsigned playerId);
void ClearGameInfoMap();
void UpdateStatData(const ServerStats &stats);
bool IsSessionEstablished() const;
void SetSessionEstablished(bool flag);
@@ -172,6 +175,9 @@ private:
unsigned m_guiPlayerId;
bool m_sessionEstablished;
mutable boost::mutex m_curStatsMutex;
ServerStats m_curStats;
friend class AbstractClientStateReceiving;
friend class ClientStateInit;
friend class ClientStateStartResolve;