DHT class

DHT service

The default bootstrape is router.bittorrent.com , router.utorrent.com ,dht.transmissionbt.com. Each UDP timeout is 15 seconds, max request process number is 24

Constructors

DHT()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
port int
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

addBootstrapNode(Uri url) → void
Add a bootstrape node url.
announce(String infohash, int port) → void
infohash is the torrent infohash string (is not hex format string).
bootstrap({int cleanNodeTime = 15 * 60, int udpTimeout = TIME_OUT_TIME, int maxQeury = 24}) Future
Start DHT service cleanNodeTime : default value is 15 minutes(15*60 seconds) , if the node which added , have no any query/response during this time DHT will remove it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
offError(void h(int code, String msg)) bool
offNewPeer(NewPeerHandler handler) bool
onError(void h(int code, String msg)) bool
onNewPeer(NewPeerHandler handler) bool
requestPeers(String infohash) → void
stop() Future
Stop DHT service.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited