WinSock best accept() practices

Posted by Meta on Stack Overflow See other posts from Stack Overflow or by Meta
Published on 2010-05-08T21:17:44Z Indexed on 2010/05/08 21:18 UTC
Read the original article Hit count: 97

Filed under:
|
|
|
|

Imagine you have a server which can handle only one client at a time. The server uses WSAAsyncSelect to be notified of new connections. In this case, what is the best way of handling FD_ACCEPT messages:

A > Accept the connection attempt right away but queue the client until its turn?

B > Do not accept the next connection attempt until we are done serving the currently connected client?

What do you guys think is the most efficient?

© Stack Overflow or respective owner

Related posts about winsock

Related posts about Windows