|
-
February 15th, 2009, 10:05 AM
#1
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.
-
February 16th, 2009, 01:23 AM
#2
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|