public void connect(object obj = null) { isStopping = false; socket = new USocket(host, port); #if UNITY_EDITOR Debug.Log("connect ==" + host + ":" + port); #endif socket.connectAsync(connectCallback, outofLine); }
public void connect(object obj) { if (socket != null) { stop(); } isStopping = false; socket = new USocket(host, port); #if UNITY_EDITOR Debug.Log("connect ==" + host + ":" + port); #endif //异步连接 socket.connectAsync(onConnectStateChg); }