|
My Project
1.8.1
C++ Distributed Hash Table
|


Public Member Functions | |
| InfoHash | middle (const RoutingTable::const_iterator &) const |
| std::vector< Sp< Node > > | findClosestNodes (const InfoHash id, time_point now, size_t count=TARGET_NODES) const |
| RoutingTable::iterator | findBucket (const InfoHash &id) |
| RoutingTable::const_iterator | findBucket (const InfoHash &id) const |
| bool | contains (const RoutingTable::const_iterator &bucket, const InfoHash &id) const |
| bool | isEmpty () const |
| void | connectivityChanged (const time_point &now) |
| bool | onNewNode (const Sp< Node > &node, int comfirm, const time_point &now, const InfoHash &myid, net::NetworkEngine &ne) |
| InfoHash | randomId (const RoutingTable::const_iterator &bucket) const |
| unsigned | depth (const RoutingTable::const_iterator &bucket) const |
| bool | split (const RoutingTable::iterator &b) |
Public Attributes | |
| time_point | grow_time {time_point::min()} |
| bool | is_client {false} |
Definition at line 52 of file routing_table.h.
|
inline |
Return true if the id is in the bucket's range.
Definition at line 69 of file routing_table.h.
|
inline |
Return true if the table has no bucket ore one empty buket.
Definition at line 77 of file routing_table.h.
| InfoHash dht::RoutingTable::randomId | ( | const RoutingTable::const_iterator & | bucket | ) | const |
Return a random id in the bucket's range.
| bool dht::RoutingTable::split | ( | const RoutingTable::iterator & | b | ) |
Split a bucket in two equal parts.