Moved each socket to its own thread