CatapultServer  v0.5.0.1 (Elephant)
catapult::nodediscovery Namespace Reference

Classes

class  BatchPeersRequestor
 Creates a batch peers requestor. More...
 
struct  NodePingRequestPolicy
 Node ping request policy. More...
 
class  NodePingResponseCompatibilityChecker
 Node ping response compatibility checker. More...
 
class  PeersProcessor
 Processes peers received from a partner node. More...
 

Typedefs

using NodePingRequestor = net::BriefServerRequestor< NodePingRequestPolicy, NodePingResponseCompatibilityChecker >
 A brief server requestor for requesting node ping information. More...
 

Functions

DECLARE_SERVICE_REGISTRAR() NodeDiscovery (const ConstNetworkNodePointer &pLocalNetworkNode)
 
DECLARE_SERVICE_REGISTRAR() NodeDiscovery (const std::shared_ptr< const ionet::NetworkNode > &pLocalNetworkNode)
 
std::shared_ptr< NodePingRequestorCreateNodePingRequestor (const std::shared_ptr< thread::IoThreadPool > &pPool, const crypto::KeyPair &keyPair, const net::ConnectionSettings &settings, model::NetworkIdentifier networkIdentifier)
 
bool TryParseNodePacket (const ionet::Packet &packet, ionet::Node &node)
 Tries to parse packet into node. More...
 
bool TryParseNodesPacket (const ionet::Packet &packet, ionet::NodeSet &nodes)
 Tries to parse packet into nodes. More...
 
bool IsNodeCompatible (const ionet::Node &node, model::NetworkIdentifier networkIdentifier, const Key &identityKey)
 Determines if node is compatible with expected network (networkIdentifier) and identity (identityKey). More...
 
ionet::NodeSet SelectUnknownNodes (const ionet::NodeContainerView &view, const ionet::NodeSet &nodes)
 Filters nodes by returning all nodes not contained in view. More...
 

Typedef Documentation

◆ NodePingRequestor

A brief server requestor for requesting node ping information.

Function Documentation

◆ CreateNodePingRequestor()

std::shared_ptr< NodePingRequestor > catapult::nodediscovery::CreateNodePingRequestor ( const std::shared_ptr< thread::IoThreadPool > &  pPool,
const crypto::KeyPair keyPair,
const net::ConnectionSettings settings,
model::NetworkIdentifier  networkIdentifier 
)

Creates a node ping requestor for a server with a key pair of keyPair and a network identified by networkIdentifier using pPool and configured with settings.

◆ IsNodeCompatible()

bool catapult::nodediscovery::IsNodeCompatible ( const ionet::Node node,
model::NetworkIdentifier  networkIdentifier,
const Key identityKey 
)

Determines if node is compatible with expected network (networkIdentifier) and identity (identityKey).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NodeDiscovery() [1/2]

DECLARE_SERVICE_REGISTRAR() catapult::nodediscovery::NodeDiscovery ( const ConstNetworkNodePointer &  pLocalNetworkNode)

◆ NodeDiscovery() [2/2]

DECLARE_SERVICE_REGISTRAR() catapult::nodediscovery::NodeDiscovery ( const std::shared_ptr< const ionet::NetworkNode > &  pLocalNetworkNode)

Creates a registrar for a node discovery service around pLocalNetworkNode.

Note
This service is responsible for allowing nodes to discover each other.

◆ SelectUnknownNodes()

ionet::NodeSet catapult::nodediscovery::SelectUnknownNodes ( const ionet::NodeContainerView view,
const ionet::NodeSet nodes 
)

Filters nodes by returning all nodes not contained in view.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryParseNodePacket()

bool catapult::nodediscovery::TryParseNodePacket ( const ionet::Packet packet,
ionet::Node node 
)

Tries to parse packet into node.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryParseNodesPacket()

bool catapult::nodediscovery::TryParseNodesPacket ( const ionet::Packet packet,
ionet::NodeSet nodes 
)

Tries to parse packet into nodes.

Here is the call graph for this function:
Here is the caller graph for this function: