I don`t understant: is there a problem to create a personal thread for every client connecting and destroy the thread when he disconnects? I have to write the same project and i`m going to do it with opening new thread for every new connection and then open separate SQL connection to the server for reading/writing data. Why you think to change that behavior with the threads?