|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DHT
Stub for KRPC
Method Summary | |
---|---|
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. |
Method Detail |
---|
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 > 0
void 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |