public interface DHT
Modifier and Type | Method and Description |
---|---|
void |
announce(byte[] ih,
boolean isSeed)
Announce to ourselves.
|
void |
announce(byte[] ih,
byte[] peerHash,
boolean isSeed)
Announce somebody else we know about to ourselves.
|
int |
announce(byte[] ih,
int max,
long maxWait,
boolean isSeed)
Announce to the closest DHT peers.
|
Collection<Hash> |
getPeersAndAnnounce(byte[] ih,
int max,
long maxWait,
int annMax,
long annMaxWait,
boolean isSeed,
boolean noSeeds)
Get peers for a torrent, and announce to the closest annMax nodes we find.
|
int |
getPort() |
int |
getRPort() |
void |
ping(Destination dest,
int port)
Ping.
|
String |
renderStatusHTML()
Debug info, HTML formatted
|
int |
size()
Known nodes, not estimated total network size.
|
void |
stop()
Stop everything.
|
void |
unannounce(byte[] ih)
Remove reference to ourselves in the local tracker.
|
int getPort()
int getRPort()
void ping(Destination dest, int port)
Collection<Hash> getPeersAndAnnounce(byte[] ih, int max, long maxWait, int annMax, long annMaxWait, boolean isSeed, boolean noSeeds)
ih
- the Info Hash (torrent)max
- maximum number of peers to returnmaxWait
- the maximum time to wait (ms) must be > 0annMax
- the number of peers to announce toannMaxWait
- the maximum total time to wait for announces, may be 0 to return immediately without waiting for acksisSeed
- true if seed, false if leechnoSeeds
- true if we do not want seeds in the resultvoid announce(byte[] ih, boolean isSeed)
ih
- the Info Hash (torrent)void announce(byte[] ih, byte[] peerHash, boolean isSeed)
ih
- the Info Hash (torrent)peerHash
- the peer's Hashvoid unannounce(byte[] ih)
ih
- the Info Hash (torrent)int announce(byte[] ih, int max, long maxWait, boolean isSeed)
ih
- the Info Hash (torrent)maxWait
- the maximum total time to wait (ms) or 0 to do all in parallel and return immediately.isSeed
- true if seed, false if leechvoid stop()
int size()
String renderStatusHTML()