示例#1
0
 public void Close()
 {
     if (socket != null)
     {
         socket.Close(true);
         socket = null;
     }
 }
示例#2
0
 private void Init()
 {
     if (socket != null)
     {
         socket.Close(false);
         socket = null;
     }
     socket = new TcpSocket();
     socket.Init(serverIP, serverPort, m_connect, m_receive, m_close, m_error);
 }
示例#3
0
        public void Close()
        {
            if (socket != null)
            {
                socket.Close(true);
                socket = null;
                completionCache.Clear();
                messageQueue.Clear();
                IsDispatch = false;
            }

            if (ping != null)
            {
                Destroy(ping);
                ping = null;
            }

            Destroy(this);
        }