|
-
September 2nd, 2009, 04:04 PM
#2
Re: Cannot accept more clients using sockets
you are using a unique loop for receiving data from the clients... look at the code, accept() is called once...
first, you will need to create an array of SOCKETS to store client connections...
an acceptor thread must be coded for accepting the clients (it can be done on the main thread)
but after that, for receiving data, you will need another threads (one-per-client, just one for all clients, which can be a little laggy, or a thread pool, read about Io Completion Ports too)
it just depends on what you will be doing next
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
|