You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
code :
Metafile metafile = new Metafile(new BufferedInputStream(new FileInputStream("c:/saber.torrent")));
TorrentDisk tdisk = new PlainFileSystemTorrentDisk(metafile, new File("c:/"));
tdisk.init();
IncomingPeerListener peerListener = new IncomingPeerListener(59999);
peerListener.start();
Torrent torrent = new Torrent(metafile, tdisk, peerListener);
torrent.startDownload();
while (!torrent.isCompleted()) {
try {
Thread.sleep(1000);
//System.out.println("downloading....");
} catch(InterruptedException ie) {
break;
}
torrent.tick();
}
error message:
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
at java.io.DataInputStream.readFully(DataInputStream.java:169)
at org.bitlet.wetorrent.peer.task.MessageReceiver.execute(MessageReceiver.java:106)
at org.bitlet.wetorrent.util.thread.InterruptableTasksThread.run(InterruptableTasksThread.java:50)
The text was updated successfully, but these errors were encountered:
Hi,I have a demo.
code :
Metafile metafile = new Metafile(new BufferedInputStream(new FileInputStream("c:/saber.torrent")));
TorrentDisk tdisk = new PlainFileSystemTorrentDisk(metafile, new File("c:/"));
tdisk.init();
IncomingPeerListener peerListener = new IncomingPeerListener(59999);
peerListener.start();
Torrent torrent = new Torrent(metafile, tdisk, peerListener);
torrent.startDownload();
while (!torrent.isCompleted()) {
try {
Thread.sleep(1000);
//System.out.println("downloading....");
} catch(InterruptedException ie) {
break;
}
torrent.tick();
}
error message:
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
at java.io.DataInputStream.readFully(DataInputStream.java:169)
at org.bitlet.wetorrent.peer.task.MessageReceiver.execute(MessageReceiver.java:106)
at org.bitlet.wetorrent.util.thread.InterruptableTasksThread.run(InterruptableTasksThread.java:50)
The text was updated successfully, but these errors were encountered: