class DHTTracker extends Object
| Constructor and Description |
|---|
DHTTracker(I2PAppContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void | announce(InfoHash ih,
Hash hash,
boolean isSeed)Announce a peer for a torrent. |
(package private) List<Hash> | getPeers(InfoHash ih,
int max,
boolean noSeeds)Get peers for a torrent. |
void | renderStatusHTML(StringBuilder buf)Debug info, HTML formatted. |
void | start() |
(package private) void | stop()Stop the tracker |
(package private) void | unannounce(InfoHash ih,
Hash hash)Remove a peer from a torrent's peer list. |
DHTTracker(I2PAppContext ctx)
ctx - the app contextvoid announce(InfoHash ih, Hash hash, boolean isSeed)
ih - the info hash of the torrenthash - the peer's destination hashisSeed - true if the peer is a seedList<Hash> getPeers(InfoHash ih, int max, boolean noSeeds)
ih - the info hash of the torrentmax - maximum number of peers to returnnoSeeds - true if we do not want seeds in the resultpublic void renderStatusHTML(StringBuilder buf)
buf - the buffer to append HTML topublic void start()
void stop()