I understand the basics of multi threading but in most of my previous experience I was creating new threads and letting them die when the method was completed. I have a multi client server with a thread handling all of the low level socket reads and writes using the reactor single thread method.

Now when a socket is read the final data is transfered to a handler method. What I want to achieve is having this handler method on a different thread processing the possible commands. Meaning I want to initiate this thread on startup and keep it alive the entire time.

I will also need to specify a thread for accepting connections and creating the sockets, then passing the accepted socket to the processing thread.

Its just hard for me to understand how this process works because my previous experience was just creating threads for each connection. Any reading that is recommended on this subject? or any information you can give me is appreciated.

Thanks.