aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-10-15 03:48:22 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-10-15 03:48:22 -0700
commitf0c25cf6ecb226d2a82d04d73af44ca6bc0f3efa (patch)
tree0883a42d7dda4a59858d62c8b03b6f019f3c7d8c /src/net.h
parent6fb27534eb98f8d4bc17d0fdea98c7a25d04f887 (diff)
parentce14345a89dfa05992f8d2c7c9fe36315d4a67e6 (diff)
downloadbitcoin-f0c25cf6ecb226d2a82d04d73af44ca6bc0f3efa.tar.xz
Merge pull request #2924 from sje397/TrafficGraph
[QT] Add network traffic graph to debug window
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 51c3dab8f3..9b76d1643d 100644
--- a/src/net.h
+++ b/src/net.h
@@ -298,8 +298,15 @@ public:
}
private:
+ // Network usage totals
+ static CCriticalSection cs_totalBytesRecv;
+ static CCriticalSection cs_totalBytesSent;
+ static uint64 nTotalBytesRecv;
+ static uint64 nTotalBytesSent;
+
CNode(const CNode&);
void operator=(const CNode&);
+
public:
@@ -646,6 +653,13 @@ public:
static bool IsBanned(CNetAddr ip);
bool Misbehaving(int howmuch); // 1 == a little, 100 == a lot
void copyStats(CNodeStats &stats);
+
+ // Network stats
+ static void RecordBytesRecv(uint64 bytes);
+ static void RecordBytesSent(uint64 bytes);
+
+ static uint64 GetTotalBytesRecv();
+ static uint64 GetTotalBytesSent();
};