I have a basic socket server up and running - it listens on port x, when it receives an external request it does some stuff with that connection, then it resets to handle the next request.
I want to make the socket server so that it can handle multiple requests at the same sometime.
Could I get some guidance on what techniques will be required for this. In my mind, the following would seem relevent:
1. Creating a new tread for each incoming connection
2. Somehow passing off each new connection to another port (random) so that port x is freed up to await the next connection
3. Ensuring that the working code that does stuff with the external request is thread safe.
Is there anything else I should consider.