![]() |
|
Programming a Torrent Client? - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Programming a Torrent Client? (/Thread-Programming-a-Torrent-Client) |
Programming a Torrent Client? - ShawnReynolds - 09-20-2014 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. Programming a Torrent Client? - ShawnReynolds - 09-20-2014 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. RE: Programming a Torrent Client? - dropzon3 - 09-21-2014 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++ RE: Programming a Torrent Client? - dropzon3 - 09-21-2014 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++ |