Implementing Bittorrent Protocol

I am looking for a tutorial/blog post on how to implement bittorrent protocol step by step. How it works? How do you make requests to peers? and talk to trackers.

I do not mind the programming language (java,ruby,perl,c#)


the complete description of bittorrent protocol:

http://jonas.nitro.dk/bittorrent/bittorrent-rfc.html


There is the libtorrent library.

Here's the API documentation and examples.


This is good source http://www.kristenwidman.com/blog/how-to-write-a-bittorrent-client-part-1/ She explains the process step by step...