26 ::google::protobuf::Message
const& message,
27 protocol::MessageType type,
33 if (type == protocol::mtHAVE_SET)
36 if (
auto msg =
dynamic_cast<protocol::TMLedgerData const*
>(&message))
38 if (msg->type() == protocol::liTS_CANDIDATE)
44 if (msg->type() == protocol::liTX_NODE)
50 if (msg->type() == protocol::liAS_NODE)
60 if (
auto msg =
dynamic_cast<protocol::TMGetLedger const*
>(&message))
62 if (msg->itype() == protocol::liTS_CANDIDATE)
68 if (msg->itype() == protocol::liTX_NODE)
74 if (msg->itype() == protocol::liAS_NODE)
84 if (
auto msg =
dynamic_cast<protocol::TMGetObjectByHash const*
>(&message))
86 if (msg->type() == protocol::TMGetObjectByHash::otLEDGER)
92 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTION)
98 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTION_NODE)
104 if (msg->type() == protocol::TMGetObjectByHash::otSTATE_NODE)
110 if (msg->type() == protocol::TMGetObjectByHash::otCAS_OBJECT)
116 if (msg->type() == protocol::TMGetObjectByHash::otFETCH_PACK)
122 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTIONS)
static category categorize(::google::protobuf::Message const &message, protocol::MessageType type, bool inbound)
Given a protocol message, determine which traffic category it belongs to.