Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Static Public Member Functions | List of all members
TestNodeTable Struct Reference
Inheritance diagram for TestNodeTable:
[legend]
Collaboration diagram for TestNodeTable:
[legend]

Public Member Functions

 TestNodeTable (ba::io_service &_io, KeyPair _alias, bi::address const &_addr, uint16_t _port=30300)
 Constructor. More...
 
void pingTestNodes (std::vector< std::pair< KeyPair, unsigned >> const &_testNodes)
 
void populateTestNodes (std::vector< std::pair< KeyPair, unsigned >> const &_testNodes, size_t _count=0)
 
void reset ()
 
- Public Member Functions inherited from dev::p2p::NodeTable
 NodeTable (ba::io_service &_io, KeyPair const &_alias, NodeIPEndpoint const &_endpoint, bool _enabled=true)
 Constructor requiring host for I/O, credentials, and IP Address and port to listen on. More...
 
 ~NodeTable ()
 
void setEventHandler (NodeTableEventHandler *_handler)
 Set event handler for NodeEntryAdded and NodeEntryDropped events. More...
 
void processEvents ()
 Called by implementation which provided handler to process NodeEntryAdded/NodeEntryDropped events. Events are coalesced by type whereby old events are ignored. More...
 
std::shared_ptr< NodeEntryaddNode (Node const &_node, NodeRelation _relation=NodeRelation::Unknown)
 Add node. Node will be pinged and empty shared_ptr is returned if node has never been seen or NodeID is empty. More...
 
std::list< NodeIDnodes () const
 Returns list of node ids active in node table. More...
 
unsigned count () const
 Returns node count. More...
 
std::list< NodeEntrysnapshot () const
 Returns snapshot of table. More...
 
bool haveNode (NodeID const &_id)
 Returns true if node id is in node table. More...
 
Node node (NodeID const &_id)
 Returns the Node to the corresponding node id or the empty Node if that id is not found. More...
 

Static Public Member Functions

static std::vector< std::pair< KeyPair, unsigned > > createTestNodes (unsigned _count)
 
- Static Public Member Functions inherited from dev::p2p::NodeTable
static unsigned distance (NodeID const &_a, NodeID const &_b)
 Returns distance based on xor metric two node ids. Used by NodeEntry and NodeTable. More...
 

Additional Inherited Members

- Public Types inherited from dev::p2p::NodeTable
enum  NodeRelation { Unknown = 0, Known }
 
enum  DiscoverType { Random = 0 }
 

Detailed Description

Definition at line 62 of file net.cpp.

Constructor & Destructor Documentation

TestNodeTable::TestNodeTable ( ba::io_service &  _io,
KeyPair  _alias,
bi::address const &  _addr,
uint16_t  _port = 30300 
)
inline

Constructor.

Definition at line 65 of file net.cpp.

Member Function Documentation

static std::vector<std::pair<KeyPair,unsigned> > TestNodeTable::createTestNodes ( unsigned  _count)
inlinestatic

Definition at line 67 of file net.cpp.

Here is the caller graph for this function:

void TestNodeTable::pingTestNodes ( std::vector< std::pair< KeyPair, unsigned >> const &  _testNodes)
inline

Definition at line 83 of file net.cpp.

Here is the call graph for this function:

void TestNodeTable::populateTestNodes ( std::vector< std::pair< KeyPair, unsigned >> const &  _testNodes,
size_t  _count = 0 
)
inline

Definition at line 93 of file net.cpp.

Here is the call graph for this function:

void TestNodeTable::reset ( )
inline

Definition at line 115 of file net.cpp.


The documentation for this struct was generated from the following file: