21 #ifndef DHT_KBUCKETTABLE_H
22 #define DHT_KBUCKETTABLE_H
25 #include <dht/kbucket.h>
36 KBucketTable(
const Key & our_id);
37 virtual ~KBucketTable();
40 void insert(
const KBucketEntry & entry, RPCServerInterface* srv);
61 typedef std::list<KBucket::Ptr> KBucketList;
62 KBucketList::iterator findBucket(
const dht::Key &
id);
71 #endif // DHT_KBUCKETTABLE_H
void refreshBuckets(DHT *dh_table)
Refresh the buckets.
int numEntries() const
Get the number of entries.
Key in the distributed hash table.
void loadTable(const QString &file, dht::RPCServerInterface *srv)
Load the table from a file.
void onTimeout(const net::Address &addr)
Timeout happened.
void insert(const KBucketEntry &entry, RPCServerInterface *srv)
Insert a KBucketEntry into the table.
void saveTable(const QString &file)
Save table to a file.
void findKClosestNodes(KClosestNodesSearch &kns)
FInd the K closest nodes.