use of com.biglybt.core.peer.cache.CachePeer in project BiglyBT by BiglySoftware.
the class CLCacheDiscovery method main.
public static void main(String[] args) {
try {
TOTorrent torrent = TOTorrentFactory.deserialiseFromBEncodedFile(new File("C:\\temp\\test.torrent"));
CachePeer[] peers = new CLCacheDiscovery().lookup(torrent);
System.out.println("peers=" + peers.length);
for (int i = 0; i < peers.length; i++) {
System.out.println(" cache: " + peers[i].getAddress() + ":" + peers[i].getPort());
}
} catch (Throwable e) {
e.printStackTrace();
}
}