Hi guys,
I just want to ask what is the best way in my current problem. I have a client/server application. Everytime a client connect to the server, I create a thread to handle it. I save the thread id in an array. My problem is that, when a client disconnect, I dont know which thread to destroy. If I can get the hostname or ip address, I can also save it together with the thread id and my problem is solved. But when a client connect to the server, I don't have that information. Can anyone help me?