Pike v8.1 release 6

Class Protocols.Bittorrent.DHT()->GetPeers

Inheritance graph
Protocols.Bittorrent.DHT.DHTOperation Protocols.Bittorrent.DHT.GetPeers
Description

The GetPeers class is used to initiate queries to the DHT where peers for a hash is desired. Upon completion, the done_db will be called with the GetPeers instance as the first argument and the done_cb_args as the following arguments.

The done_cb function is expected to examine the results array to find out what the result of the query actually contains. For this query, the result array will be an array with two elements; the first one containing any responses from nodes that knows of peers and the second one will contain the closest nodes to the target hash that we saw during the query.


Variable closest_nodes

array Protocols.Bittorrent.DHT.GetPeers.closest_nodes

Description

Sorted array of the closest K nodes we've seen in the query.


Variable desired_results

int Protocols.Bittorrent.DHT.GetPeers.desired_results

Description

Override the default number of desired results


Inherit DHTOperation

inherit DHTOperation : DHTOperation