Track peer traffic by category

This commit is contained in:
JoelKatz
2015-09-28 16:05:05 -07:00
committed by Nik Bougalis
parent 5ee94f8928
commit 61e5359231
13 changed files with 339 additions and 6 deletions

View File

@@ -19,6 +19,7 @@
#include <BeastConfig.h>
#include <ripple/overlay/Message.h>
#include <ripple/overlay/impl/TrafficCount.h>
#include <cstdint>
namespace ripple {
@@ -37,6 +38,9 @@ Message::Message (::google::protobuf::Message const& message, int type)
{
message.SerializeToArray (&mBuffer [Message::kHeaderBytes], messageBytes);
}
mCategory = static_cast<int>(TrafficCount::categorize
(message, type, false));
}
bool Message::operator== (Message const& other) const