示例#1
0
        public void ShutDown()
        {
            m_Shutdown = true;

            if (m_ClientConnThread.IsAlive)
            {
                m_ClientConnThread.Abort();
                m_ClientConnThread.Join();
            }

            if (m_HostConnThread.IsAlive)
            {
                m_HostConnThread.Abort();
                m_HostConnThread.Join();
            }

            try
            {
                m_CargoHostEndPoint.RemoveCaseChangeListener(m_CaseChangeCallback);
                m_CargoHostEndPoint.RemoveAnalystWSComm(m_AnalystCallback);
                try
                {
                    m_CargoHostEndPoint.RemoveManualCodingComm(m_ManualCodingCallback);
                }
                catch { }
                m_NetworkHost.Close();
                base.IsShuttingDown = true;
                base.Dispose();
            }
            catch (Exception)
            {
            }
        }