Closed Peterppan closed 5 years ago
Thank you again for your help,I place the whole file into the client path,and the other client download success. But I find another problem, I create the tracker and client in a pc ,another client is a android machine which run app using this jar. I can download success from android to the pc.On the contrary,it not.It only create a .part file and the tracker RequestEvent event: NONE. I restar the app ,wait for a while ,the tracker RequestEvent event: COMPLETED. But the file till .part. then ,i copy the .part file and remove suffix name (.part) ,this file data is corrected. (ps. ths file is a excel file so i can konw the data is right) I try to find why?If you have some suggest plase tell me ,thanks.
I find the reason,this project use Apache Commons IO-2.1,and my app uss Apache Commons IO-1.3.The Apache Commons IO-1.3 have't the method FileUtils.deleteQuietly .So when the program run finish in FileStorage is not wroking. I change the app Apache Commons IO version to 2.1 is work welll. Finally,thanks for your help!
the problem is solved.
just add a torrent to the communication manager using
Seeder is a just peer which has all pieces of the torrent. When you add a new torrent, the library scans
addTorrent
method withdownloadDirPath
parameter=downloadDir
and calculates existing pieces. This peer will seed all existing pieces. You can see some examples inCommunicationManagerTest
class. E.g.large_file_download()
test creates a file with size about 200mb, runs tracker and two clients. Then second peer downloads the file from first peer