CatapultServer
v0.5.0.1 (Elephant)
|
Processes peers received from a partner node. More...
Public Member Functions | |
PeersProcessor (const ionet::NodeContainer &nodeContainer, const NodePingRequestInitiator &pingRequestInitiator, model::NetworkIdentifier networkIdentifier, const NodeConsumer &newPartnerNodeConsumer) | |
void | process (const ionet::NodeSet &candidateNodes) const |
Processes all candidate nodes (candidateNodes) and forwards newly discovered partner nodes. More... | |
Private Types | |
using | NodeConsumer = consumer< const ionet::Node & > |
using | NodePingRequestInitiator = consumer< const ionet::Node &, const consumer< net::NodeRequestResult, const ionet::Node & > & > |
Private Member Functions | |
void | process (const ionet::Node &candidateNode) const |
Private Attributes | |
const ionet::NodeContainer & | m_nodeContainer |
NodePingRequestInitiator | m_pingRequestInitiator |
model::NetworkIdentifier | m_networkIdentifier |
NodeConsumer | m_newPartnerNodeConsumer |
Processes peers received from a partner node.
|
private |
|
private |
catapult::nodediscovery::PeersProcessor::PeersProcessor | ( | const ionet::NodeContainer & | nodeContainer, |
const NodePingRequestInitiator & | pingRequestInitiator, | ||
model::NetworkIdentifier | networkIdentifier, | ||
const NodeConsumer & | newPartnerNodeConsumer | ||
) |
Creates a processor around the set of known nodes (nodeContainer), a service for pinging other nodes (pingRequesInitiator), the current network identifier (networkIdentifier) and a consumer that should be called when new partner nodes are discovered (newPartnerNodeConsumer).
|
private |
void catapult::nodediscovery::PeersProcessor::process | ( | const ionet::NodeSet & | candidateNodes | ) | const |
Processes all candidate nodes (candidateNodes) and forwards newly discovered partner nodes.
|
private |
|
private |
|
private |
|
private |