mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Add network traffic graph
This commit is contained in:
14
src/net.h
14
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();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user