Closed asadsm closed 5 years ago
SimpleClient
doesn't support it, you can use CommunicationManager
ExecutorService workingExecutor = Executors.newFixedThreadPool(8);
ExecutorService validatorExecutor = Executors.newFixedThreadPool(8);
CommunicationManager cm = new CommunicationManager(workingExecutor, validatorExecutor);
cm.start(InetAddress.getLocalHost());
cm.addTorrent("/path/to/torrent", "/path/to/data/dir", FullyPieceStorageFactory.INSTANCE)
//don't forget to shutdown executors when you will stop your program,
So library will skip validation and mark all pieces as valid.
Perfect. Thanks!
In v 1.5 I used the following code to start a seeder:
Client seeder = new Client(InetAddress.getLocalHost(), new SharedTorrent(torrent, new File(dirName), true));
In v 2.0 I'm using the following but this goes through the whole process of validation. Is there a way to avoid that?
seeder.downloadTorrentAsync(torrentFile.getAbsolutePath(), torrentFile.getParent(), InetAddress.getLocalHost());
Basically calling the downloadTorrent on the machine which contains the initial data to torrent. Any way to avoid this download path?