Thread: Socket Server
View Single Post
Old May 20th, 2006, 2:43 PM   #2
jayme
Professional Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 495
Rep Power: 0 jayme is an unknown quantity at this point
Send a message via MSN to jayme
The program doesn't halt when listen() is called, it sets the socket specified so it is allowed to listen for new incomming connections. It's simple, if you don't enable mysock to listen(), mysock won't be able to accept() clients into the server.

By the way, I don't think the three function you've created are exactly necessary. They create more lines than are needed, especially the WinConnect() function. You shouldn't worry about making functions like these until you're working with slightly(a lot?) bigger programs.
__________________

Quote:
Originally Posted by Mohamed Jihad
Durka durka!
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it.

Download Code::Blocks now!
jayme is offline   Reply With Quote