TCP connection logic basically works, but I need to check how the threading is done (since it interacts with the Broker).