The purpose is to return control to the client if the server is busy, so that it can determine what to do.
The server code referenced previously is a stripped down case. The actual server is using a pre-fork model. Open socket, fork multiple child processes each calling accept with the OS figuring out which child gets to do the accept. Would you use semaphores?
In reply to Re^2: TCP server: How to reject connections when busy? (some FM TR)
by squirrel
in thread TCP server: How to reject connections when busy?
by squirrel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |