Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-05 17:45:30 +0000
committerStijn Buys <ingar@osirion.org>2008-05-05 17:45:30 +0000
commitc11c0174ece92b4502648ad33653975bfdfc39a0 (patch)
tree88860bfcbb7206834e61533af79f7631b5638cb2 /src/core/netconnection.cc
parent7218e3bd4616d4706090ec47d72845a2bb89c6a3 (diff)
lights with entity color, sunlight, network stats
Diffstat (limited to 'src/core/netconnection.cc')
-rw-r--r--src/core/netconnection.cc3
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();