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