public class TrackerClient extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
static int |
PORT |
Constructor and Description |
---|
TrackerClient(I2PSnarkUtil util,
MetaInfo meta,
String additionalTrackerURL,
PeerCoordinator coordinator,
Snark snark)
Call start() to start it.
|
Modifier and Type | Method and Description |
---|---|
void |
halt(boolean fast)
Interrupts this Thread to stop it.
|
boolean |
halted() |
static boolean |
isValidAnnounce(String ann) |
void |
run()
Setup the first time only,
then one pass (usually) through the trackers, PEX, and DHT.
|
void |
start() |
boolean |
started() |
static String |
urlencode(byte[] bs)
Very lazy byte[] to URL encoder.
|
public static final int PORT
public TrackerClient(I2PSnarkUtil util, MetaInfo meta, String additionalTrackerURL, PeerCoordinator coordinator, Snark snark)
meta
- null if in magnet modeadditionalTrackerURL
- may be null, from the ?tr= param in magnet mode, otherwise ignoredpublic void start()
public boolean halted()
public boolean started()
public void halt(boolean fast)
fast
- if true, limit the life of the unannounce threadspublic void run()
public static String urlencode(byte[] bs)
public static boolean isValidAnnounce(String ann)
ann
- an announce URL, may be null, returns false if null