Package org.klomp.snark
Class TrackerInfo
java.lang.Object
org.klomp.snark.TrackerInfo
class TrackerInfo extends Object
The data structure for the tracker response.
Handles both traditional and compact formats.
Compact format 1 - a list of hashes - early format for testing
Compact format 2 - One big string of concatenated hashes - official format
-
Constructor Summary
Constructors Constructor Description TrackerInfo(InputStream in, byte[] my_id, byte[] infohash, MetaInfo metainfo, I2PSnarkUtil util)
-
Method Summary
Modifier and Type Method Description String
getFailureReason()
Not HTML escaped.int
getInterval()
in secondsint
getPeerCount()
Set<Peer>
getPeers()
int
getSeedCount()
String
toString()
-
Constructor Details
-
TrackerInfo
public TrackerInfo(InputStream in, byte[] my_id, byte[] infohash, MetaInfo metainfo, I2PSnarkUtil util) throws IOException- Parameters:
metainfo
- may be null- Throws:
IOException
-
-
Method Details
-
getPeers
-
getPeerCount
public int getPeerCount() -
getSeedCount
public int getSeedCount()- Since:
- 0.9.9
-
getFailureReason
Not HTML escaped. -
getInterval
public int getInterval()in seconds -
toString
-