Following is the existing flow.

1. From GUI StationLogin() API is invoked.
2. The Dll creates the API into XML message
3. DLL send this XML message over the socket to the other component.
4. That component process that message and respond with some more xml messages and actual response.

So in step 3 socket object is used to send the messages and step 4 is used the same object to receive the messages.

So If i create the socket object in QThread::Run() then I will not be able to use it in step 3.