org.klomp.snark.dht
public interface DHT
Modifier and Type | Method and Description |
---|---|
void |
announce(byte[] ih)
Announce to ourselves.
|
void |
announce(byte[] ih,
byte[] peerHash)
Announce somebody else we know about.
|
int |
announce(byte[] ih,
int max,
long maxWait)
Announce to the closest DHT peers.
|
List<Hash> |
getPeers(byte[] ih,
int max,
long maxWait)
Get peers for a torrent.
|
int |
getPort() |
void |
ping(Destination dest,
int port)
Ping.
|
void |
unannounce(byte[] ih)
Remove reference to ourselves in the local tracker.
|
int getPort()
void ping(Destination dest, int port)
List<Hash> getPeers(byte[] ih, int max, long maxWait)
ih
- the Info Hash (torrent)max
- maximum number of peers to returnmaxWait
- the maximum time to wait (ms) must be > 0void announce(byte[] ih)
ih
- the Info Hash (torrent)void announce(byte[] ih, byte[] peerHash)
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)
ih
- the Info Hash (torrent)maxWait
- the maximum total time to wait (ms) or 0 to do all in parallel and return immediately.