Solved

Client/Server Programming

Posted on 2004-10-03
5
176 Views
Last Modified: 2010-04-01
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...
0
Comment
Question by:bjw5d6
5 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
Comment Utility
Maybe if you post your client program, we can explain it more detailed. But generally speaking, it is relatively easy to code a client program with some specialized functions.
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.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
Comment Utility
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
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
0
 
LVL 15

Accepted Solution

by:
efn earned 500 total points
Comment Utility
To answer your question, yes, that's how it works.

It's not any weirder than your web browser connecting to the Experts Exchange server so you could post this question.  The same communication functions that the web browser uses are available to you as a C++ programmer.  You have the power!
0
 

Author Comment

by:bjw5d6
Comment Utility
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.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now