Question about Building a Server
Hi.
I'm building a sever that can serve many client simulatenusly, so I have the main thread which has a socket opened for listening and accepting new connection, and for each new socket I place it in a data-structure.
my question is: how to make this single thread accepts new sockets and also when a user (that's already connected) sends data to handle it ....?!?! my accept() is non-blocking and I use overlapping sockets.
I hope I'm being clear......
Thanks.
Re: Question about Building a Server
For non-blocking sockets, you can mulitplex between server socket and any active client sockets using select().
Kevin Choong