예제 #1
0
 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);
 }
예제 #2
0
        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);
        }