The server is like the host. When you are connecting to a server, you are acting as the "client". Think of it like going over to someone else's house, and while you're there you can meet with other people who are there. The house is like the server and the people are like the clients.
But that's a very simplified explanation.
I'll just defer to wikipedia for details. It does a decent job of explaining it:
So when we enter a games server we and the other players are the clients while we are all in a server.
Does this apply to only games or other examples ?
Thank you disch for that explanation
So let me guess the browser we use right now is the cilent and when we request a web page we are connecting to the server am i correct ?
if im wrong feel free to correct me
I just want to learn Network programming but whats the point if i dont have a good understanding on basics
In an attempt to explain the typical Server/Client model:
A server is just a glorified logic handler. A client is a dummy; it brainlessly follows the server's every command, sending input to it and receiving commands.
I'll give an analogy somewhat similar Disch's analogy. Think of a server as the owner of a house hosting a gathering. The server will respond to any questions and try to satisfy and needs that a client may have. The people at the party will generally obey what the host says without question (assuming they aren't rude), although they may leave at any time. The guests don't really have much control over the host, as it's his house and the host may do whatever they desire. If the host finds a guests' behavior intolerable, they may ask, or force if necessary, them to leave.
Another way to think of it is a boss and his worker.
_______________________
MIZ wrote:
im starting to understand cilent and server
For example our browser is a cilent to request web pages we connect to a server.
But how does a network(2 or more computers) play into this
What exactly are you trying to ask? Are you requesting for us to explain how the internet works or explain how the PC itself handles it? Or maybe you're requesting how the actual server handles it on application level?
My question which I will try to make it less vague is
When we use a client and server
What does a network do ??
Is the network all the clients connected to the server ?
The network is the literal connections between clients and servers. A computer network is a bunch of computers connected to a server. There can be different, varying structures of networks: spoke topology, mesh topology. The internet is an example of a spoke topology- a bunch of computers are all connected to one DNS server run by a cable company, which then redirects the signal to another server, which then bounces to the destination server. In other words, the network of you connecting to this website goes computer->cable server->cable server->cplusplus.com. A mesh topology is where each computer in the network bounces between each other in order to get to a destination. In other words, each client also acts as a server for other clients.
I might be wrong, in which case I hope someone corrects me.
Oh thank you so computers networks and game networks are diffrient ?
Thanks for the help
Also if any one programmed in C how comes there are not many libraries unlike c++(boost sfml)
If there are not many c libraries or Apis how do you make other applications other then console