#include <dhtbase.h>
|
void | started () |
|
void | stopped () |
|
- Author
- Joris Guisson joris.nosp@m..gui.nosp@m.sson@.nosp@m.gmai.nosp@m.l.com
Interface for DHT class, this is to keep other things separate from the inner workings of the DHT.
Definition at line 52 of file dhtbase.h.
◆ addDHTNode()
virtual void dht::DHTBase::addDHTNode |
( |
const QString & |
host, |
|
|
bt::Uint16 |
hport |
|
) |
| |
|
pure virtual |
Add a DHT node. This node shall be pinged immediately.
- Parameters
-
host | The hostname or ip |
hport | The port of the host |
Implemented in dht::DHT.
◆ announce()
Do an announce on the DHT network
- Parameters
-
info_hash | The info_hash |
port | The port |
- Returns
- The task which handles this
Implemented in dht::DHT.
◆ getClosestGoodNodes()
virtual QMap<QString, int> dht::DHTBase::getClosestGoodNodes |
( |
int |
maxNodes | ) |
|
|
pure virtual |
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. |
Implemented in dht::DHT.
◆ isRunning()
bool dht::DHTBase::isRunning |
( |
| ) |
const |
|
inline |
◆ portReceived()
virtual void dht::DHTBase::portReceived |
( |
const QString & |
ip, |
|
|
bt::Uint16 |
port |
|
) |
| |
|
pure virtual |
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 |
Implemented in dht::DHT.
◆ start()
virtual void dht::DHTBase::start |
( |
const QString & |
table, |
|
|
const QString & |
key_file, |
|
|
bt::Uint16 |
port |
|
) |
| |
|
pure virtual |
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 |
Implemented in dht::DHT.
◆ stop()
virtual void dht::DHTBase::stop |
( |
| ) |
|
|
pure virtual |
◆ update()
virtual void dht::DHTBase::update |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: