Solved

Client/Server Programming

Posted on 2004-10-03
5
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 12211931
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
ID: 12211955
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
ID: 12212376
0
 
LVL 15

Accepted Solution

by:
efn earned 500 total points
ID: 12212439
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
ID: 12231594
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

738 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