diff options
author | David Athay <ko2fan@gmail.com> | 2008-11-19 13:36:50 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-11-19 15:02:10 +0000 |
commit | 8481413ea17177945d3d280b1518eb6f1f25cd5d (patch) | |
tree | 77ed689d7587a6d06c07dd81c3ca0d5c49b3284d /src/game-server/gamehandler.hpp | |
parent | 751cc20a3be820724ca575aab32c2bb424f89a5b (diff) | |
download | manaserv-8481413ea17177945d3d280b1518eb6f1f25cd5d.tar.gz manaserv-8481413ea17177945d3d280b1518eb6f1f25cd5d.tar.bz2 manaserv-8481413ea17177945d3d280b1518eb6f1f25cd5d.tar.xz manaserv-8481413ea17177945d3d280b1518eb6f1f25cd5d.zip |
Added bandwidth monitoring
Diffstat (limited to 'src/game-server/gamehandler.hpp')
-rw-r--r-- | src/game-server/gamehandler.hpp | 13 |
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; |