Hi there, so here is the dilemma: Basically I'm creating a server listener program to run on a server. I want this application to be able to accept an unknown number of connections at any one time, and I want the server application to spawn a new thread for communication with each of these connections.
So, I have a few options (I think), I'm wondering what would be the best way to accomplish this task:
Assign a large static array of sockets and threads and hope the connections don't go over?
Use a dynamic data structure for the array of sockets and threads? If so, what data structure?
Another thing: Is there a limit on the amount of sockets for a machine running Windows and a machine running a Unix based distro? Oh and is there a limit for the amount of threads running at any one time?