bjw5d6
asked on
Client/Server Programming
This is my first Client/Server Program that I've written... OK, I haven't really
started yet... but, I am having trouble understanding how this works....
1) I write a Client program in C++
2) I have my computer connected to the internet... like I have Netzero running...
3) I execute my Client program
4) My program will connect to the Server (my instructors computer) because of the code written in the program?
It seems really weird that the code I write in C++ will cause my computer to connect
with my instructors computer...just by executing the program...
Is that how it works????
side note: I'm taking an internet class which is why I'm missing this most fundamental piece of information...
started yet... but, I am having trouble understanding how this works....
1) I write a Client program in C++
2) I have my computer connected to the internet... like I have Netzero running...
3) I execute my Client program
4) My program will connect to the Server (my instructors computer) because of the code written in the program?
It seems really weird that the code I write in C++ will cause my computer to connect
with my instructors computer...just by executing the program...
Is that how it works????
side note: I'm taking an internet class which is why I'm missing this most fundamental piece of information...
Here are good tutorials of client programming with socket library:
http://www.codeproject.com/internet/winsockintro02.asp
http://www.codeproject.com/internet/server_client_sockets.asp
More examples for Visual C++ at:
http://www.codeproject.com/internet
http://www.codeproject.com/internet/winsockintro02.asp
http://www.codeproject.com/internet/server_client_sockets.asp
More examples for Visual C++ at:
http://www.codeproject.com/internet
Also check http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/finished_server_and_client_code.asp ("Complete Server and Client Code")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, efn, for letting me know I had the power. I finished my program and it worked. I had no idea C++ could do that. Thanks jkr and jaime_olivares for your responses and weblinks, they helped too. Sorry it took so long to respond... I'm new to this.
This is done usually with functions of the 'socket' library, it provides functions to connect to an specific server, by name or by IP address, send some data and receive data.