Class Protocols.Bittorrent.DHT()->DHTOperation

Inheritance graph
Description

Base class for operations that need to iterate over the DHT in some way like get_peers and find_node.


Variable desired_results

int Protocols.Bittorrent.DHT.DHTOperation.desired_results

Description

Desired number of results before the op considers itself done


Variable target_hash
Variable done_cb
Variable done_cb_args

string Protocols.Bittorrent.DHT.DHTOperation.target_hash
function(:void)|zero Protocols.Bittorrent.DHT.DHTOperation.done_cb
array(mixed) Protocols.Bittorrent.DHT.DHTOperation.done_cb_args


Variable max_no_requests

int Protocols.Bittorrent.DHT.DHTOperation.max_no_requests

Description

Maximum number of requests that may be generated before bailing out.


Variable max_outstanding_requests

int(0..) Protocols.Bittorrent.DHT.DHTOperation.max_outstanding_requests

Description

Maximum number of concurrent requests allowed


Variable query_timeout_period

float|int Protocols.Bittorrent.DHT.DHTOperation.query_timeout_period

Description

Timeout for the query


Variable reqs

int Protocols.Bittorrent.DHT.DHTOperation.reqs

Description

Number of requests generated by this query


Variable result

array Protocols.Bittorrent.DHT.DHTOperation.result

Description

Result of the operation to be inspected by the done callback. Content of the result array varies depending on the concrete implementation of the operation


Variable result_count

int Protocols.Bittorrent.DHT.DHTOperation.result_count

Description

Result counter - may differ from actual number of objects in the result array in some cases. For example in the get_peers query, closest nodes may be added in addition to any peers found.


Method create

Protocols.Bittorrent.DHT.DHTOperation Protocols.Bittorrent.DHT.DHTOperation(string target_hash, function(:void)|zero done_cb, mixed ... done_cb_args)