Made client like a server, through the thread