summaryrefslogtreecommitdiff
path: root/src/game-server/gamehandler.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/gamehandler.hpp')
-rw-r--r--src/game-server/gamehandler.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game-server/gamehandler.hpp b/src/game-server/gamehandler.hpp
index 0ae0d495..42ba8cbc 100644
--- a/src/game-server/gamehandler.hpp
+++ b/src/game-server/gamehandler.hpp
@@ -118,6 +118,16 @@ class GameHandler: public ConnectionHandler
*/
GameClient *getClientByNameSlow(std::string const &);
+ /**
+ * Calculate the total amount of bandwidth sent to all clients
+ */
+ int calculateTotalOut();
+
+ /**
+ * Calculate the total amount of bandwidth received from all clients
+ */
+ int calculateTotalIn();
+
protected:
NetComputer *computerConnected(ENetPeer *);
void computerDisconnected(NetComputer *);
@@ -154,6 +164,9 @@ class GameHandler: public ConnectionHandler
*/
TokenCollector<GameHandler, GameClient *, Character *> mTokenCollector;
+ int mTotalBandwidthOut;
+ int mTotalBandwidthIn;
+
};
extern GameHandler *gameHandler;