Monday, May 24, 2010

How do i begin Network programming in c++?

For this you need to have C++ compiler on windows or linux.


You can use free microsoft visual C++ compiler or you can own Visual Studio. For linux you can use gcc, there is a version of gcc for windows also.





Read some tutorial about socket programming.


In basic socket works as link between two programs over which you can transfer data.





Suppose you have two bucket and you want to transfer water from one bucket to another.


for this you will use a pipe and connect those two bucket, then water will flow from one two another.





similarly if there are two process those are running on two different pc. and you want to transfer data between them, then you will use sockets.





As for sending letters/emails you need address of remote person similarly for using socket and sending data you need to know the address of remote application that is IP address and port number;





socket works in client-server model, one has to be server and another has to be client.





so using this concept you can start network programming.


example for simple hello world kind of programming you can find in google, and try out.


No comments:

Post a Comment