#include <dht_discovery.h>
|
| static InfoHash | hash_for_key (const std::string &key) |
| | Map an application key to a stable 20-byte discovery hash (SHA-1).
|
| |
Definition at line 40 of file dht_discovery.h.
◆ DhtDiscovery()
| librats::DhtDiscovery::DhtDiscovery |
( |
Config |
config | ) |
|
|
explicit |
◆ ~DhtDiscovery()
| librats::DhtDiscovery::~DhtDiscovery |
( |
| ) |
|
|
override |
◆ attach()
| void librats::DhtDiscovery::attach |
( |
NodeContext & |
ctx | ) |
|
|
overridevirtual |
◆ dht_client()
| DhtClient * librats::DhtDiscovery::dht_client |
( |
| ) |
|
|
inlineoverride |
DhtService: hand out the live Kademlia node so siblings (e.g.
Bittorrent) can share this swarm. IPv4 preferred, IPv6 fallback; nullptr before start() / after stop(). Borrow it during start() and drop it in stop() (see DhtService).
Definition at line 73 of file dht_discovery.h.
◆ dht_port()
| uint16_t librats::DhtDiscovery::dht_port |
( |
| ) |
const |
IPv4 DHT UDP port (0 if not running)
◆ dht_port_v6()
| uint16_t librats::DhtDiscovery::dht_port_v6 |
( |
| ) |
const |
IPv6 DHT UDP port (0 if not running)
◆ discovery_hash()
| InfoHash librats::DhtDiscovery::discovery_hash |
( |
| ) |
const |
|
inline |
◆ external_address()
| std::string librats::DhtDiscovery::external_address |
( |
| ) |
const |
Our external (public) IP currently used to derive the DHT node id, learned via STUN at startup or in-DHT "ip" voting.
"" if not yet known / random.
◆ hash_for_key()
| static InfoHash librats::DhtDiscovery::hash_for_key |
( |
const std::string & |
key | ) |
|
|
static |
Map an application key to a stable 20-byte discovery hash (SHA-1).
◆ is_running()
| bool librats::DhtDiscovery::is_running |
( |
| ) |
const |
◆ start()
| void librats::DhtDiscovery::start |
( |
| ) |
|
|
overridevirtual |
◆ stop()
| void librats::DhtDiscovery::stop |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: