diff options
Diffstat (limited to 'src/core/netconnection.cc')
-rw-r--r-- | src/core/netconnection.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc index fd590c0..dda339c 100644 --- a/src/core/netconnection.cc +++ b/src/core/netconnection.cc @@ -11,6 +11,7 @@ #include "core/gameconnection.h" #include "core/netconnection.h" #include "core/player.h" +#include "core/stats.h" namespace core { @@ -136,6 +137,7 @@ void NetConnection::receive() memset(recvbuf, '\0', BLOCKSIZE); bytes_received = ::recv(connection_fd, recvbuf, BLOCKSIZE-1, 0); + Stats::network_bytes_received += bytes_received; connection_timeout = core::application()->time(); if (bytes_received == 0) { @@ -249,6 +251,7 @@ void NetConnection::transmit() // assert (bytes_sent <= sendbuf.size()); sendq.erase(0, bytes_sent); + Stats::network_bytes_sent += bytes_sent; } connection_keepalive = application()->time(); |