31 ::google::protobuf::Message
const& message,
32 protocol::MessageType type,
38 if (type == protocol::mtHAVE_SET)
41 if (
auto msg =
dynamic_cast<protocol::TMLedgerData const*
>(&message))
43 if (msg->type() == protocol::liTS_CANDIDATE)
49 if (msg->type() == protocol::liTX_NODE)
55 if (msg->type() == protocol::liAS_NODE)
65 if (
auto msg =
dynamic_cast<protocol::TMGetLedger const*
>(&message))
67 if (msg->itype() == protocol::liTS_CANDIDATE)
73 if (msg->itype() == protocol::liTX_NODE)
79 if (msg->itype() == protocol::liAS_NODE)
89 if (
auto msg =
dynamic_cast<protocol::TMGetObjectByHash const*
>(&message))
91 if (msg->type() == protocol::TMGetObjectByHash::otLEDGER)
97 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTION)
103 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTION_NODE)
109 if (msg->type() == protocol::TMGetObjectByHash::otSTATE_NODE)
115 if (msg->type() == protocol::TMGetObjectByHash::otCAS_OBJECT)
121 if (msg->type() == protocol::TMGetObjectByHash::otFETCH_PACK)
127 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.