diff options
author | Scott Ellis <sje397@gmail.com> | 2013-08-23 02:09:32 +1000 |
---|---|---|
committer | Scott Ellis <sje397@gmail.com> | 2013-10-14 19:02:03 +1100 |
commit | ce14345a89dfa05992f8d2c7c9fe36315d4a67e6 (patch) | |
tree | 997e08222a82558e8720fa0ce0ba82438f161664 /src/net.h | |
parent | 9269d0e96e621a6e02da8074785ac310ce64db73 (diff) |
Add network traffic graph
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(); }; |