Add network traffic graph

This commit is contained in:
Scott Ellis
2013-08-23 02:09:32 +10:00
parent 9269d0e96e
commit ce14345a89
13 changed files with 618 additions and 9 deletions

View File

@@ -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();
};