Changing socket to client