Exemple #1
0
 public void Close()
 {
     if (socket != null)
     {
         socket.Close(true);
         socket = null;
     }
 }
Exemple #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);
 }
Exemple #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);
        }