How to Write a BitTorrent Client, Part 1
kristenwidman.com
kristenwidman.com
I wrote up my adventure too: http://seanjoflynn.com/research/bittorrent.html
The source is on Github: https://github.com/zielmicha/torrent-workshops
(unfortunately you need to register before using it, but you can even use fake mail)