Hi,

First of all, read about threads. You are redefining the "run" method to finally call "exec", why? Do you really need a thread?
The other problem I think that you are trying to connect the socket SIGNALs to the thread SLOTs in "DirectConnection" that is not possible as you will have two threads that have direct communication.