Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,173 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,929 people online right now. Registration is fast and FREE... Join Now!




C++ for p2p program

 
Reply to this topicStart new topic

C++ for p2p program, Is C++ ideal for p2p?

justin2021
6 Dec, 2007 - 05:39 PM
Post #1

New D.I.C Head
*

Joined: 6 Dec, 2007
Posts: 5


My Contributions
I want to make a simple p2p program that does the following in C++, although I have heard that C# is ideal for networking:

Be able to access one remote computer over the internet

Be able to save that computer as a "friend" and access it whenever it's online

Have it's target only one particular folder on that remote computer, called 'share' for example, showing the files inside.

Have a drag and drop system from the remote computer, enabling you to grab files from their 'share' folder and download them to your desktop.

Are there any ways I should go about starting this? I'm somewhat new to C++, and have never used C#. As far as network programing goes, I have no experience with it. Thanks in advance.



User is offlineProfile CardPM
+Quote Post

NickDMax
RE: C++ For P2p Program
6 Dec, 2007 - 11:00 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 49 times
Dream Kudos: 550
My Contributions
Well my personal advice would be to start learning C#.

Basically the point is that this is easier in C# than it is in C++ and if you don't know much about C++ or C# it will be easier to learn C# and write your program that it will be to learn C++ and write a program.

if you are going to use C++ I would suggest looking into the sockets.h which is part of the Windows API.
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: C++ For P2p Program
6 Dec, 2007 - 11:06 PM
Post #3

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,199



Thanked: 213 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
I agree with NickDMax. One great book you want to check out is Peer to Peer with VB .NET by Matthew MacDonald. This is for VB.NET but you could easily adapt some of the ideas and style to easily fit C#. It would show you a bit about topics like remoting, setting up client/server architectures etc.

Peer to Peer with VB.NET - Matthew MacDonald

Now you could write a perfectly good p2p program in C++ but as Nick eluded to, it is a bit more cryptic and if you don't know C++ that well, it may be a bit tedious. You can certainly build one faster with C# because much of it is built for you.

In short, I concur with Nick's recommendations.

smile.gif

This post has been edited by Martyr2: 6 Dec, 2007 - 11:07 PM
User is offlineProfile CardPM
+Quote Post

justin2021
RE: C++ For P2p Program
6 Dec, 2007 - 11:40 PM
Post #4

New D.I.C Head
*

Joined: 6 Dec, 2007
Posts: 5


My Contributions
Thanks a lot. Well then I'll definitely look more into C# more and check out VB.NET as well.
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 12:42AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month