[core-dev] BitTorrent & NIO
Gregorio Roper <[email protected]> Sun, 25 Jul 2004 22:59:33 +0200
| Newsgroups | gmane.network.gnutella.limewire.core.devel |
|---|---|
| Message-ID | <[email protected]> |
I have reached the point where my BT implementation is almost working (I still need to hammer out the bugs and find a smart way to manage the bandwidth usage of concurrent blocking and non-blocking io operations). However I have a little problem: There is absolutely no way of implementing BT using blocking IO. I need to keep ~100 connections open all the time to have the torrent perform decently and I cannot afford to have my write operations block for even a second. So far I simply converted the Acceptor and Sockets classes simply to use Sun's NIO implementation which works well for the rest of LimeWire too on Java 1.5. In addition I had to modify the downloading code to use long variables instead of ints which of course breaks the compatibility with older downloads.dat files. mfg gregorio _______________________________________________ core-dev mailing list [email protected] http://www.limewire.org/mailman/listinfo/core-dev