Wednesday, January 28, 2009

Second Release

Again, code that is pretty much unusable as is, except for creating a Seed and '.torrent' file.

20090128
What You Get
Clicking a torrent will give a choice whether to 'download' the torrent. The download will not be saved to disk. Next time :-)
Clicking Tools > Create Seed allows the creation of a single file torrent, including setting of the tracker. It also provides the choice of saving the '.torrent' file and/or starting to seed immediately. A server socket will be opened, but unfortunately the IP address reported to the tracker will be incorrect - this doesn't matter so much, as trackers like OpenTracker ignore the IP address reported, and use the IP address the report came from.
Still only bothers to open one peer connection, and when that connection dies, doesn't recover. (This was pretty much left as-is, because it is easier to debug one peer connection than many).

Fixes
  • Bencoding dictionaries has been corrected. Previously, the keys weren't sorted; this is incorrect behaviour, they needed to be or bdecoding fails in Mainline BT (and probably any other bencoding library)
  • Bitfield messages from peers has been corrected. Was reading from the wrong end of the byte, eg. Given a bitfield 00000001, it was interpretted that the peer had piece 0, not piece 7.
  • If a peer had only one piece of interest, receiving the unchoked message did not start the download of that piece. This has been corrected, but I think needs some more work.

1 comment:

  1. Sounds good big fella, keep up the good work.
    The blog is great, even if I only understand half of it.

    ReplyDelete