My Project: dht::RoutingTable Class Reference

My Project 3.7.7 C++ Distributed Hash Table

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
dht::RoutingTable Class Reference
Inheritance diagram for dht::RoutingTable:
[legend]
Collaboration diagram for dht::RoutingTable:
[legend]

## 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, std::mt19937_64 &rd) 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}

## Detailed Description

Definition at line 43 of file routing_table.h.

## Member Function Documentation

## ◆ connectivityChanged()

void dht::RoutingTable::connectivityChanged | ( | const time_point & | now | ) |
| inline

Definition at line 72 of file routing_table.h.

## ◆ contains()

bool dht::RoutingTable::contains | ( | const RoutingTable::const_iterator & | bucket,
|  | const InfoHash & | id ) const
| inline

Return true if the id is in the bucket's range.

Definition at line 61 of file routing_table.h.

## ◆ isEmpty()

bool dht::RoutingTable::isEmpty | ( |  | ) | const
| inline

Return true if the table has no bucket ore one empty buket.

Definition at line 70 of file routing_table.h.

## ◆ randomId()

InfoHash dht::RoutingTable::randomId | ( | const RoutingTable::const_iterator & | bucket,
|  | std::mt19937_64 & | rd ) const

Return a random id in the bucket's range.

## ◆ split()

bool dht::RoutingTable::split | ( | const RoutingTable::iterator & | b | ) |

Split a bucket in two equal parts.

## Member Data Documentation

## ◆ grow_time

time_point dht::RoutingTable::grow_time {time_point::min()}

Definition at line 48 of file routing_table.h.

## ◆ is_client

bool dht::RoutingTable::is_client {false}

Definition at line 49 of file routing_table.h.

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

- /home/noptrix/ba/blackarch/packages/opendht-c/src/opendht/include/opendht/routing_table.h