示例#1
0
        public void Disconnect()
        {
            if (Status == ConnectStatus.Connected ||
                Status == ConnectStatus.Connecting)

            {
                App.UnsubscribeUpdate(Update);
                Net.CloseSocket(Net.SocketToken);
                ConnectTime = 0;
                Status      = ConnectStatus.Disconnected;
            }
        }
示例#2
0
 private void OnApplicationQuit()
 {
     Debug.Log("game exit!");
     Net.CloseSocket();
 }