bitletorg / bitlet Goto Github PK
View Code? Open in Web Editor NEWA small Java bittorrent library, powering BitLet.org
A small Java bittorrent library, powering BitLet.org
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)
I get it your probably going to clown on me for putting this, but i have been looking every where and i have tried. I just cant seem to get BITLET working i dont even know how to start it or what not. I have tried Ive tried this
BUT I CANT GET IT TO WORK .... yes i know that "$1 " is the torrent file but i wouldnt know how to start or use it
the reason i want t use it is because my ISP hase been throttling my fucken internet connection for my Peer2Peer connection ....... anyone help me out plss
I'm so confused... what software do I have to use exactly?
There is a NullPointerException thrown in file 'Metafile.java' at line 86
byte[] announceByteString = ((ByteBuffer) rootDictionary.get(toByteBuffer("announce"))).array();
I cant download multiple torrents.
Metafile metafile = new Metafile(new BufferedInputStream(new FileInputStream(torrentPath)));
// Create the torrent disk, this is the destination where the torrent file/s will be saved
TorrentDisk tdisk = new PlainFileSystemTorrentDisk(metafile, output);
tdisk.init();
IncomingPeerListener peerListener = new IncomingPeerListener(randInt(5555,7777));
peerListener.start();
Torrent torrent = new Torrent(metafile, tdisk, peerListener);
torrent.startDownload();
while (!torrent.isCompleted()) {
try {
Thread.sleep(500);
} catch(InterruptedException ie) {
break;
}
torrent.tick();
nombre = torrent.getMetafile().getName().trim();
ratio = torrent.getPeersManager().getActivePeersNumber();
size = (int) torrent.getMetafile().getLength();
long actual = torrent.getTorrentDisk().getCompleted();
progreso = (actual * 100/ size);
System.out.printf("Got %s peers, completed %d bytes \n",
torrent.getPeersManager().getActivePeersNumber(),
torrent.getTorrentDisk().getCompleted());
System.out.println(torrent.getMetafile().getLength());
}
torrent.interrupt();
peerListener.interrupt();
How should WebSeeds work?
There doesn't seem to be code pulling the url-list out of the metadata. I could write this but then there doesn't seem to be a way to add it to the peers manager. It seems that everything is typed as TorrentPeer and not the superclass Peer.
Metafile metafile = new Metafile(new BufferedInputStream(new FileInputStream(filename)));
// filename1 is a new torrent file
metafile.print(new BufferedOutputStream(new FileOutputStream(filename1, true)));
//but filename1 can't be used
//first,edit Announce/Comment/FileName or something else in a torrent file,after that save a new torrent file,how to do that?
Hi
i tried tu use the library but it seems that it only supports http trackers.
When torrent has udp tracker then:
in method org.bitlet.wetorrent.Tracker.trackerRequest(Torrent, String)
line 68: URL trackerUrl = new URL(trackerUrlString);
will cause:
java.net.MalformedURLException: unknown protocol: udp
Maybe this will be helpfull:
http://stackoverflow.com/questions/15184376/torrent-related-tracker-response-on-udp-protocol-update-3-working
Best regards
Pawel
java.io.EOFException
at java.io.DataInputStream.readInt(Unknown Source)
at org.bitlet.wetorrent.peer.task.MessageReceiver.execute(MessageReceiver.java:55)
at org.bitlet.wetorrent.util.thread.InterruptableTasksThread.run(InterruptableTasksThread.java:50)
java.io.EOFException
at java.io.DataInputStream.readInt(Unknown Source)
at org.bitlet.wetorrent.peer.task.MessageReceiver.execute(MessageReceiver.java:55)
at org.bitlet.wetorrent.util.thread.InterruptableTasksThread.run(InterruptableTasksThread.java:50)
The README.md file says that bitlet is LGPL but the license file and license headers on the project files are all Apache license.
The project would benefit from a README.md noting the project license and execution of the sample class, e.g.:
java -cp target/wetorrent-1.0-SNAPSHOT.jar org.bitlet.wetorrent.Sample ubuntu-14.04-server-amd64.iso.torrent
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.