For every single tutorials and examples I have seen on the internet for Linux/Unix socket tutorials, the server side code always involves an infinite loop that checks for cl
Here's a good overview of what techniques are available - The C10K problem.