Exemplo n.º 1
0
        public void DeleteRelayConnector()
        {
            if (null == this.m_pRelayConnector)
            {
                return;
            }

            if (null != m_pRpcClient)
            {
                m_pRpcClient.DeleteConnectionBySrcPUUID(m_pRelayConnector.SendPUUID);
            }

            if (null != m_pProcessUnitBank)
            {
                m_pProcessUnitBank.RemoveProcessUnitReal(m_PUUID);
            }

            if (null != m_pSocketManager)
            {
                UInt32     socketId = this.m_pRelayConnector.SocketID;
                BaseSocket pSocket  = m_pSocketManager.GetSocketFromID(socketId);
                if (null != pSocket)
                {
                    m_pSocketManager.DeleteSocket(pSocket);
                    pSocket = null;
                }
            }

            m_pProcessUnit.UnsetRelayConnector(this.m_pRelayConnector);

            this.m_pRelayConnector.SetProcessUnit(null);
            this.m_pRelayConnector.SetSocketManager(null);
            m_pRelayConnector = null;
        }