Client / Server programming - generic steps to start a server or a client
11 comments. Current rating: (3 votes). Leave comments and/ or rate it.
Client/server network programming requires a server running on one machine to listen and answer requests and one or more clients running either on the same machine or different machines connected to the server through a network.
Independent from your operating system and programming language, you'll have to follow the following basic steps to create and run a server (the function refers to the unix naming convention; almost all languages have interfaces to them):
Create a socket with socket
Bind the socket to a port address with bind
Listen to the socket at the port address with listen
Accept client connections with accept
Creating a client involves less steps:
Create a socket with socket
Connect the socket to the remote machine with connect
Most modern environments offer classes, components, beans, Active-X controls.. libraries.. to abstract this process but it's good to know the basic steps that happen behind the scenes in case you get an error message 'Cannot bind socket'.. 'port already in use'.
Send a message to
Subject
Comments:
2009-06-08, 11:56:00
wanwan from Japan
@2009-06-08, 07:36:47
salahettaki@live.fr from Morocco
OK Morocco
What point are, You trying to make by posting that copy of
what, I wrote on this thread all over this site ?
Then only speak what, I believe to be French ?
What are, You playing at ?
If, You have something to say to me then say it.
Don't play like a child and post things all over this site.
I guarantee, You will not be able to keep doing that for very long
if, You choose to keep doing it.
Agent 86 Maxwell Smart \\'^o^'//
To everyone else this Morocco idiot copied and pasted
my words from the Bill Dorsen thread.
Keywords:
2009-06-08, 23:34:46
anonymous from United States
From BadDog:
Your warnings are heeded WanWan and Agent 86.
I thank you for the visual aids!
Awesome dog, WanWan I have a beagle; looks like their brother.
Be careful to not step too hard on any annoying frogs!
Got hit on by an Esmerelda@hotmail today....Oh the fun begins!
What if this takes away from time with real girlfriend ?
Is that virtual infidelity?
Keep up the good work guys!
BadDog
Keywords:
2009-06-09, 00:31:09
Agent,86 from Salem, United States
BadDog
I Thank You for the lovely Frog picture. LOL
Even in Chariots of Fire it was the Frogs that made
Little run on a different Day. LOL
Trust me, I don't want to have to scrape to much off shoes. LOL
It seems the Moroccan is like the Scirocco from which, He came.
We will see if, He returns ?
Kind Regards Agent 86 Maxwell Smart \\'^o^'//
Yes Wanwan My Asian Friend is much like, His Ancestors
Always coming up with something new like Water Skiing LOL This image was also posted here: Dating scammer Rhoda Naa from Accra, Ghana
The Poster from Morocco has been removed completely.
So if the line of postings that fallowed it look out of place that's the
reason they were put here in the first place.
Another Idiot removed Thanks to everyone who responded to the moron.