View Full Version : C# Bittorrent Client Project
leoandru
April 6, 2005, 03:47 PM
Like the title of the thread says i want to code a bittorrent client in C#. It's strictly for learning purposes because many bittorent clients already exist. However there are no clients that were coded in .NET and I would like to be the first to do so.
I would like members of TechJa who are interested in learning C# and network programming in .NET to jump in; I guarantee that u stand to learn a lot.
It is possible that we could also code the project in VB.NET and any other language that’s a part of the .NET platform. However it will probably be confusing and it wouldn't port to platforms like Linux. Currently C# is the only .NET language that’s is implemented on other platforms outside windows.
Anyways I want to know what you guys thing about this project and if your interested let me know. I could start a cvs server that hosts the project sources and a project home page perhaps.
crosswire
April 6, 2005, 04:44 PM
I am willing to learn, I think I have a background understanding of networking, server-client and peer-to-peer. I guess the internet networking is different than LAN networking. I could read up on that. I would also read up on C#. But it is all about learning DotNet, so I am good to go.
Just for learning purposes, as I see it as a skills improvement for job marketing. Learn how to make the dough.
Electrotechnic
April 6, 2005, 05:04 PM
I don't know squat...but mi head nuh tuff....i'll visit and see if i can atleast learn something.....
leoandru
April 6, 2005, 06:01 PM
It is possible that we could also code the project in VB.NET and any other language thats a part of the .NET platform. However it will probably be confusing and it wouldn't port to paltforms like linux. Currently C# is the only .NET language thats is implemented on other platforms outside windows.
A bit of clarification before anyone jumps on my case. On .NET you can code a single project in multiple languages, so to clear this up a bit i want to code this project in C# only using multiple languages may be confusing.
leoandru
April 6, 2005, 06:27 PM
Ok good to see that we have ppl already interested. we can start of by reading the bittorrent specifications here (http://wiki.theory.org/BitTorrentSpecification) and here (http://www.bittorrent.com/protocol.html).
If you are still interested after reading those specs we can move on by learning how to use source control via cvs or subversion :eusa_thin. uhmm i need to decide on which to use. I plan to host the source control server on my personal computer until i find a better alternative. so sources won't be available unless my pc is on.
You can download cvsnt from here (http://www.cvsnt.com/cvspro/). install and play with it. it has help files and tutorials that explain how to use cvs. When ur done learning to use the command line version you can switch to a gui cvs client called Tortoise CVS (http://www.tortoisecvs.org/). We will be using that for our project.
I have tons of e-books on C# (i hope this aint illegal) that i'd like to share with those interested in learning C# and working on this project. I have a ftp file server going that you can download the books from but u'll need the username and password from me.. pm me for the credentials. I would like to use a project home page for project managment. Person working on this could login and get access to resources.
If anyone here like to help us with the project home page please chip in.
I guess after we have all been up to speed with the bittorent protocol, C# programming and network programming, and using version control, we could go ahead and start design and coding.
leoandru
April 7, 2005, 06:47 PM
umm anyone read the bittorrent specification yet?
birchoff
April 7, 2005, 10:36 PM
a basic bittorent client in .NET shouldnt take much time... especially since you can rip the spec's implementation out of the regular bittorrent client.
leoandru
April 7, 2005, 11:36 PM
well yes that is how i/we plan to start, making a simple bittorrnet engine then build on it to make a full fledge bittorrent client like azureus or bitcomet then incorporate http, ftp, and gopher protocols to make it a complete download manager. I don't plan on ripping off anything we won't learn much that way. If that was the case i wouldn't even bother, i'd just use the other implementations.
leoandru
April 8, 2005, 11:15 PM
Oh well seem like not much interest is been generated into this. I guess i'll be going solo. I'll post updates if anyone still interested. I'm trying to setup the project site as i type!!
megiddo
April 8, 2005, 11:21 PM
im interested, but i dont code. you should look into how it is that bitcomet somehow gets around NATS and firewalls. because i know they cope with that easily.
leoandru
April 9, 2005, 12:07 AM
yup!! got that planed too, bitcomet and azureus use UPnP (http://www.upnp.org/default.asp) protocol to talk to networked routers asking them to foward traffic. So its a matter of reading the specs and implementing it. Its gonna take some time though.
leoandru
April 9, 2005, 07:17 PM
Alright i got a project page going for this. I spent the day trying to get this up. Its powered by plone and host on my pc for now.. check it out
http://codebox.zapto.org/
leoandru
April 9, 2005, 07:21 PM
Ok one thing the page doesn't have much on it yet. I'll be working to add more content about the project later. will update it when im done.
leoandru
April 9, 2005, 11:17 PM
The site wasn't working properly after the first post. Its working fine now. Once Again the project page will be temporarily hosted at http://codebox.zapto.org/
nder
April 11, 2005, 03:22 PM
So, if this project is done it C#, would it be possible to use Mono?
leoandru
April 11, 2005, 03:59 PM
Or DOTGNU.. im doing a research on both platforms!!
leoandru
April 12, 2005, 05:56 PM
Updates:
I got an unofficail name for this project. Initially i wanted to name it BitGet then BitSharp (cuz it would be programmed in C#). Those name suck.. so i came up with BitShark.
Im still working on the details on the project: I have decide to give u guys introductory C# programming tutorials so look out for that on my site..
Oh yeah the site :icon_mrgr. As you all noticed the site is Plone based, he he.. Plone is beging to steal my attention from everything else. Trust mi its a wonderful software that i want to master for no obvious reason.
megiddo
April 12, 2005, 10:12 PM
not trying to be a damper. but with exeem trying to decentralize bittorrent, and the onslaught of lawsuits from babylon, how will your app adapt to the soon to be second generation bittorrent?
leoandru
April 12, 2005, 11:01 PM
Uhmm. Exeem is a network in itself, similar to Gnutella, Edonkey and Kaza. The difference is that it uses the bittorent protocol as its method of file transfer. When u open a torrent in exeem its searches the exeem network for a file with the same hash, then connect to peers and seeds uploading the file. Thats how they managed to eliminate the need for a centralized tracker. If your connected to the exeem network u r hit by searches for files your seeding or downloading. It is possible that this new client can connect to the exeem network where it could search for seeds and peers to downlaod from. The only problem is that the implementation of the network is closed. With the limited resources and time that i have its near impossible to do guess work on this network. Unless someone wants to volunteer to do so or wait until they open the implementation or until someone creates an opensource implmentation that can connect to the exeem network.
leoandru
April 12, 2005, 11:06 PM
Here is the FAQ on Exeem. the answer to the first question explains that it is a network in itself.
Exeem FAQ (http://www.exeem.com/faq.htm#faq1)
megiddo
April 13, 2005, 12:22 AM
ohhh, now i see. those cnet people had me under the impression that it was a type of bittorrent. i perfectly understand now. keep us posted on ur progress :)
nder
April 13, 2005, 12:57 AM
How can you read news from CNET?? CNET has a reputation for either oversimplifying things, or blowing them out of proportion. Or doing both, so that what they report is really pointless and of no real value.
My question on open source options was based on this: what about those of us out there using Linux or a Mac :D but that might want to do this just as a learning experience? Will whatever development platform that will be used support this? Or will this be a MS C# Implementation project?
leoandru
April 17, 2005, 09:47 PM
Created the first c# tutorial on the project page, can be viewed @ http://codebox.zapto.org/tutorials/hello
its not much but will give a basic introduction to C# programming.
@Ender I have decided to use Portable.Net for cross platform development.. If i stick close to standard C# and use System.Windows.Forms windowing toolkit it should be seamlessly cross platform without modification to codes. If you want to you can take a look at the DotGnu Portable.Net project (http://www.dotgnu.org/pnet.html).
Portable.Net also got the QT# (KDE) and GTK# (GNOME) windowing libraries to play with.
crosswire
April 27, 2005, 11:39 PM
OK I did about 2 hours of reading on:
C# Language Specification
by Scott Wiltamuth and Anders Hejlsberg
from VC#.Net documentation
and took a look at
Branching and Looping in C#, Part 1
contributed by Michael Youssef
http://www.aspfree.com/c/b/C-Sharp
so far so good! Tomorrow I will try to do more.
leoandru
April 27, 2005, 11:52 PM
:eusa_clap good good. so what are your thoughs about the language so far?
crosswire
April 28, 2005, 12:48 AM
It allows some things to be written easier. Like passing an object to represent all data types. In C++, I would be fighting templates to get that.
It allows the use of a wider library than VC++.
megiddo
April 28, 2005, 01:06 AM
is there a beta release for the torrent client yet?
leoandru
April 28, 2005, 01:22 AM
LOL... not yet megiddo, im still in the design/research phase. Im still young when it comes to C# so i have to be coding simple network programs (like my socks4 proxy (http://www.techjamaica.com/forums/showthread.php?t=10913) ) to get comfortable with the language. Im also working on the logical desing of the software. I want it to support plugins and other protocols like http, ftp, gopher (kinda like an all in one dl manager). So basically im still working on the blue prints for this program. which include class/object designing and communication between the objects, anyone wishing to participate can easliy understanding the software without going into code. After im done with the design i'll be posting a schedule for the releases.
If i didn't have a full time job ill be one my way with coding already. I guess by mid May i'll be able to give a schedule.
alexdevmaster
May 9, 2005, 03:13 PM
is there a beta release for the torrent client yet?
What about now? Are you still designing?
Virus_NCU
May 9, 2005, 06:14 PM
i have read, about bit torrent. and i am already a GURU on C3 so im in.
what u have soo far, and what can i do.
when reading the document a saw that there is already a torent client in .Net called TorrentDotNet.
leoandru
May 9, 2005, 06:17 PM
What about now? Are you still designing?
Yea I am I will post details on the coding phase coming next Monday.
leoandru
May 9, 2005, 06:27 PM
i have read, about bit torrent. and i am already a GURU on C3 so im in.
what u have soo far, and what can i do.
Cool wonderful.. So far nothing in code yet, I am still working on the design. With limited time it is not going as fast as I expected. I want the coding to be coordinated by a versioning system called subversion. The system will be hosted on my server at home. Now what would be need is for you to learn how to use subversion to work on the code for the project. Also what development tools do you have for .Net?
Code wise:
Now even though im still designing the overall system it is possible to start writing code without it. for eg we know we need a module that will take a torrent file and create the necessary directory structure or file structure of the torrent. If it is possible I would like someone to investigate or even attempt to do this. I will pm you with more details when i get home later.
Virus_NCU
May 9, 2005, 06:48 PM
ok, i am using VS.NET 2k3
leoandru
May 9, 2005, 07:01 PM
Ok. good
Have you used a version control system before? If you havn't then here is
tortoise svn (http://tortoisesvn.tigris.org/). This is a frontend to a subversion server you can play with it, read the faq, and the introductory tutorial (thats comes in the installer). By this evening or tomorrow you'll be able to check out existing code from the subversion sever modify it and check it back in.
leoandru
May 10, 2005, 01:46 AM
If you find time you can read this book. It its long but you only need to read the first few chapters (1 & 2 should be enough). It will introduce you to subversion and how to use it.
http://svnbook.red-bean.com/en/1.0/svn-book.html
Just an intro from this book:
What is Subversion?
Subversion is a free/open-source version control system. That is, Subversion manages files and directories over time. A tree of files is placed into a central repository. The repository is much like an ordinary file server, except that it remembers every change ever made to your files and directories. This allows you to recover older versions of your data, or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine”.
Subversion can access its repository across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration. Progress can occur more quickly without a single conduit through which all modifications must occur. And because the work is versioned, you need not fear that quality is the trade-off for losing that conduit—if some incorrect change is made to the data, just undo that change.
Some version control systems are also software configuration management (SCM) systems. These systems are specifically tailored to manage trees of source code, and have many features that are specific to software development—such as natively understanding programming languages, or supplying tools for building software. Subversion, however, is not one of these systems. It is a general system that can be used to manage any collection of files. For you, those files might be source code—for others, anything from grocery shopping lists to digital video mixdowns and beyond.
alexdevmaster
May 10, 2005, 09:13 AM
Cool wonderful.. So far nothing in code yet, I am still working on the design. With limited time it is not going as fast as I expected. I want the coding to be coordinated by a versioning system called subversion. The system will be hosted on my server at home. Now what would be need is for you to learn how to use subversion to work on the code for the project. Also what development tools do you have for .Net?
Cool, I use subversion at work everyday. All I need to do now is get .Net on my machine at home.
Code wise:
Now even though im still designing the overall system it is possible to start writing code without it. for eg we know we need a module that will take a torrent file and create the necessary directory structure or file structure of the torrent. If it is possible I would like someone to investigate or even attempt to do this. I will pm you with more details when i get home later.
I will try to look into this today, but I cant make any promises, I have a HUGE todo list.
megiddo
May 26, 2005, 01:18 PM
leoandru thanx for the heads up on the new features in the protocol, you plan to implement these in your project?
leoandru
May 26, 2005, 06:30 PM
leoandru thanx for the heads up on the new features in the protocol, you plan to implement these in your project?
definately it will implement the full bittorent protocol at the time of coding.
Unfortunately I gave this project a break in favor of learning freebsd for the past two weeks. I will be back on track this weekend with coding of interfaces. I will make announces on this project on May 30th, 2005.
digimon
June 8, 2005, 12:02 PM
uhm.....Is it that your are creating a de-centralized thingy? or should i say, a tracker less torrent?
megiddo
June 8, 2005, 08:54 PM
well the latest changes to the bittorrent protocol allow for tracker less torrents, and leoandru sed he would make sure his is fully compliant, so yes thats what he is doing
Mutant_Fruit
May 22, 2007, 04:43 AM
Just as a reference (should it help in your development), there's a C# uPnP library here (http://anonsvn.mono-project.com/viewcvs/trunk/Mono.Nat/). There's also a c# BitTorrent library here (http://anonsvn.mono-project.com/viewcvs/trunk/bitsharp/).
And both of them run under Mono (http://www.mono-project.com/Main_Page), meaning Windows, MacOS and Linux support.
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.