My Project: dht::NodeCache Struct Reference

My Project 3.7.7 C++ Distributed Hash Table

Loading...
Searching...
No Matches
Public Member Functions | List of all members
dht::NodeCache Struct Reference

## Public Member Functions
size_t | size (sa_family_t family) const
size_t | size () const
Sp< Node > | getNode (const InfoHash &id, sa_family_t family)
Sp< Node > | getNode (const InfoHash &id, const SockAddr &, time_point now, bool confirmed, bool client=false)
std::vector< Sp< Node > > | getCachedNodes (const InfoHash &id, sa_family_t sa_f, size_t count) const
void | clearBadNodes (sa_family_t family=0)
| NodeCache (std::mt19937_64 &r)

## Detailed Description

Definition at line 12 of file node_cache.h.

## Constructor & Destructor Documentation

## ◆ NodeCache()

dht::NodeCache::NodeCache | ( | std::mt19937_64 & | r | ) |
| inline

Definition at line 28 of file node_cache.h.

## Member Function Documentation

## ◆ clearBadNodes()

void dht::NodeCache::clearBadNodes | ( | sa_family_t | family = 0 | ) |

Reset the connectivity state of every node, Giving them a new chance if they where expired. To use in case of connectivity change etc.

## ◆ size() [1/2]

size_t dht::NodeCache::size | ( |  | ) | const
| inline

Definition at line 15 of file node_cache.h.

## ◆ size() [2/2]

size_t dht::NodeCache::size | ( | sa_family_t | family | ) | const
| inline

Definition at line 14 of file node_cache.h.

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

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