diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-10-15 03:48:22 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-10-15 03:48:22 -0700 |
commit | f0c25cf6ecb226d2a82d04d73af44ca6bc0f3efa (patch) | |
tree | 0883a42d7dda4a59858d62c8b03b6f019f3c7d8c /src/net.h | |
parent | 6fb27534eb98f8d4bc17d0fdea98c7a25d04f887 (diff) | |
parent | ce14345a89dfa05992f8d2c7c9fe36315d4a67e6 (diff) |
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.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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(); }; |