move connection logic into SocketIOConnection