#include <dht.h>
|
void | started () |
|
void | stopped () |
|
bt::Uint16 | port |
|
bool | running |
|
dht::Stats | stats |
|
◆ addDHTNode()
void dht::DHT::addDHTNode |
( |
const QString & |
host, |
|
|
bt::Uint16 |
hport |
|
) |
| |
|
overridevirtual |
Add a DHT node. This node shall be pinged immediately.
- Parameters
-
host | The hostname or ip |
hport | The port of the host |
Implements dht::DHTBase.
◆ announce()
Do an announce on the DHT network
- Parameters
-
info_hash | The info_hash |
port | The port |
- Returns
- The task which handles this
Implements dht::DHTBase.
◆ findNode()
Do a NodeLookup.
- Parameters
-
id | The id of the key to search |
◆ getClosestGoodNodes()
QMap<QString, int> dht::DHT::getClosestGoodNodes |
( |
int |
maxNodes | ) |
|
|
overridevirtual |
Returns maxNodes number of <IP address, port> nodes that are closest to ourselves and are good.
- Parameters
-
maxNodes | maximum nr of nodes in QMap to return. |
Implements dht::DHTBase.
◆ portReceived()
void dht::DHT::portReceived |
( |
const QString & |
ip, |
|
|
bt::Uint16 |
port |
|
) |
| |
|
overridevirtual |
A Peer has received a PORT message, and uses this function to alert the DHT of it.
- Parameters
-
ip | The IP of the peer |
port | The port in the PORT message |
Implements dht::DHTBase.
◆ refreshBucket()
Refresh a bucket using a find node task.
- Parameters
-
id | The id |
bucket | The bucket to refresh |
◆ start()
void dht::DHT::start |
( |
const QString & |
table, |
|
|
const QString & |
key_file, |
|
|
bt::Uint16 |
port |
|
) |
| |
|
overridevirtual |
Start the DHT
- Parameters
-
table | File where the save table is located |
key_file | Where our DHT key is stored |
port | The port to use |
Implements dht::DHTBase.
◆ stop()
The documentation for this class was generated from the following file: