Click here to Skip to main content
12,897,739 members (59,210 online)
Rate this:
Please Sign up or sign in to vote.
I want to share data between two users through internet. How ca i do that?
Posted 3-Feb-13 3:47am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You have essentially 2 choices that fit with the internet model.

1. Client Server. You find an internet service provider that runs or will run a piece of server software, like the Apache Web Server for example, which will allow connections to be made to it over the internet and data to be sent and recieved. 2 or more Clients can then connect to this server and exchange data with it and ultimately with one another. Now you have Facebook!

2. Peer to Peer. You make the Client Part and a small Server Part in one piece of software. Each user runs the software and a peer-to-peer network of sender/recievers is formed by all the running instances. Now you have BitTorrent!

The actual sending and recieving part is done with a set of technologies called the OSI stack. You'll already know about one of them, IP (Internet Protocol) because without an IP address you couldn't be online posting questions to Code Project.
At the top of the protocol stack, above IP and TCP (Transmision Control Protocol) in what is called the application layer are technologies like Sockets.

You can use Socket programming to send and recieve data over the internet in a way that makes it very very similar to reading and writing a file, except the 'file' is really a connection to another computer at the IP address you use to set up the socket.

There are loads of books and more stuff online about this than you could read in a 100 years. Google for a simple Chat program in your programming technology of choice to get started. Sockets are a great technology to master especially if you want to get paid for writing code. :-)
anonymous10 3-Feb-13 13:55pm
Can you please give me programming sample with little bit explanation.
Matthew Faithfull 3-Feb-13 14:04pm
OK I did the googling for you and the first one I hit was right here on Code Project
It's got a good rating and I'm sure there are many more. If you have questions about this or any other article please ask the author as I haven't read it.
Strictly speaking network applications are not classified into "client-server" and "peer-to-peer". Both concepts are just some conceptions representing some special cases. Very limiting, by the way...
Alamgirable 4-Feb-13 5:49am
i need c++ help not c#.
Matthew Faithfull 4-Feb-13 5:56am
Google says this might help you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 3 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100