|
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!
▄▄▄▄
|