Login Register






Programming a Torrent Client? filter_list
Author
Message
Programming a Torrent Client? #1
I would like to write my own torrent client, but I do not know how. I would like to know what programming language it is done best in, and if possible, some tutorials.

Reply

Programming a Torrent Client? #2
I would like to write my own torrent client, but I do not know how. I would like to know what programming language it is done best in, and if possible, some tutorials.

Reply

RE: Programming a Torrent Client? #3
If you're asking this question I think the process its likely far beyond your abilities. That said here is a pretty good intro resource for what needs to be done:

https://wiki.theory.org/BitTorrentSpecification

It covers most of (all that matters) the backround communication use by a torrent client. It also covers some of the algorithms being used on top of the communication protocols like download strategies, choking algorithm, etc.

Basically you have 3 main things to implement though:
1. Parsing the .torrent file
2. Communicating with the Trackers and DHT to find peers and seeds
3. Communicating with peers/seeds to download and upload

Of course you also need to deal with multithreading(or multiprocess) so no thread is blocking another. So if you're not familiar with the foundational knowledge of concurrent programming(semaphores, locks, message passing, etc) you might have a hard time putting it all together even if you can implement each of the three parts.

As for the language its really a question of what you are most comfortable.

Transmission is written in C and Objective C(for OSX stuff)
uTorrent is written in C++
Vuze is written in Java
BitTornado is written in Python
rTorrent is primarily C and C++
(This post was last modified: 09-21-2014, 10:25 PM by miiike980.)

Reply

RE: Programming a Torrent Client? #4
If you're asking this question I think the process its likely far beyond your abilities. That said here is a pretty good intro resource for what needs to be done:

https://wiki.theory.org/BitTorrentSpecification

It covers most of (all that matters) the backround communication use by a torrent client. It also covers some of the algorithms being used on top of the communication protocols like download strategies, choking algorithm, etc.

Basically you have 3 main things to implement though:
1. Parsing the .torrent file
2. Communicating with the Trackers and DHT to find peers and seeds
3. Communicating with peers/seeds to download and upload

Of course you also need to deal with multithreading(or multiprocess) so no thread is blocking another. So if you're not familiar with the foundational knowledge of concurrent programming(semaphores, locks, message passing, etc) you might have a hard time putting it all together even if you can implement each of the three parts.

As for the language its really a question of what you are most comfortable.

Transmission is written in C and Objective C(for OSX stuff)
uTorrent is written in C++
Vuze is written in Java
BitTornado is written in Python
rTorrent is primarily C and C++
(This post was last modified: 09-21-2014, 10:25 PM by miiike980.)

Reply