Pike v8.1 release 6

Class Protocols.Bittorrent.DHT()->Routingtable

Description

Abstraction for the routing table.


Variable allow_node_in_routing_table

function(DHTNode:int) Protocols.Bittorrent.DHT.Routingtable.allow_node_in_routing_table

Description

Callback method that determines if a peer is allowed into our routing table or not. Return 1 to allow the peer or 0 to ignore it.


Variable bucket_by_uuid
Variable buckets

mapping(string:Bucket) Protocols.Bittorrent.DHT.Routingtable.bucket_by_uuid
array(Bucket) Protocols.Bittorrent.DHT.Routingtable.buckets

Description

Buckets in our routing table


Variable my_node_id

protected string Protocols.Bittorrent.DHT.Routingtable.my_node_id

Description

Node ID that this routing table belongs to


Variable nodes_by_hash
Variable nodes_by_endpoint

mapping(string:DHTNode) Protocols.Bittorrent.DHT.Routingtable.nodes_by_hash
mapping(string:DHTNode) Protocols.Bittorrent.DHT.Routingtable.nodes_by_endpoint

Description

Lookup table for nodess so we can quickly find out if any given hash is already in our table somewhere.