Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
Net::BitTorrent::DHT(3User Contributed Perl DocumentatiNet::BitTorrent::DHT(3)

       Net::BitTorrent::DHT - Kademlia based Distributed Hash Table

       "new ( [ARGS] )"
	   Creates a "Net::BitTorrent::DHT" object.  This constructor should
	   not be used directly.

       "add_node ( { [...] } )"
	   Adds	a single node to the routing table.  Expects a hashref with
	   the following keys:

	       The hostname/IP address of the remote node.

	       The port	the remote node	has open for DHT.

	   This	is an advanced method and should not (normally)	should not be

       "node_id	( )"
	   Get the Node	ID used	to identify this client	in the DHT swarm.

       "nodes (	)"
	   Returns a list of nodes from	the routing table in a format suitable
	   for handing off to add_node(	) one by one.

       "as_string ( [ VERBOSE ]	)"
	   Returns a 'ready to print' dump of the  object's data structure.
	   If called in	void context, the structure is printed to "STDERR".
	   "VERBOSE" is	a boolean value.

       In this alpha, there are	a number of places where I break away from the
       specification.  These will all be fixed in a future version.

       o   The routing table is	flat.

       While bandwidth to/from DHT nodes will probably never be	limited	like
       other traffic, in the future, it	will be	taken into account and
       "drained" from the rate limiter.	 If there's a burst of DHT traffic,
       the peer	traffic	may be limited to avoid	the total to exceed the	global

See Also
       I have used a number of references for implementation second opinions:

       The Kademlia Paper

       BEP 5: DHT

       Notes about the BitTorrent DHT Protocol from GetRight

       Sanko Robinson <> -


License	and Legal
       Copyright (C) 2008-2009 by Sanko	Robinson <>

       This program is free software; you can redistribute it and/or modify it
       under the terms of The Artistic License 2.0.  See the LICENSE file
       included	with this distribution or  For	clarification,

       When separated from the distribution, all POD documentation is covered
       by the Creative Commons Attribution-Share Alike 3.0 License.  See  For
       clarification, see

       Neither this module nor the Author is affiliated	with BitTorrent, Inc.

perl v5.24.1			  2017-07-03	       Net::BitTorrent::DHT(3)

NAME | Constructor | Methods | Bugs | Notes | See Also | Author | License and Legal

Want to link to this manual page? Use this URL:

home | help