Ejemplo n.º 1
0
        private void Unplug()
        {
            Debug.Assert(m_plugged);
            m_plugged = false;

            //  Cancel all fd subscriptions.
            if (!m_inputError)
            {
                m_ioObject.RmFd(m_handle);
            }

            //  Disconnect from I/O threads poller object.
            m_ioObject.Unplug();

            //  Disconnect from session object.
            if (m_encoder != null)
            {
                m_encoder.SetMsgSource(null);
            }
            if (m_decoder != null)
            {
                m_decoder.SetMsgSink(null);
            }
            m_session = null;
        }
Ejemplo n.º 2
0
 protected override void ProcessTerm(int linger)
 {
     m_ioObject.SetHandler(this);
     m_ioObject.RmFd(m_handle);
     Close();
     base.ProcessTerm(linger);
 }
Ejemplo n.º 3
0
        protected override void ProcessTerm(int linger)
        {
            if (m_timerStarted)
            {
                m_ioObject.CancelTimer(ReconnectTimerId);
                m_timerStarted = false;
            }

            if (m_handleValid)
            {
                m_ioObject.RmFd(m_handle);
                m_handleValid = false;
            }

            if (m_s != null)
            {
                Close();
            }

            base.ProcessTerm(linger);
        }
Ejemplo n.º 4
0
        private void Error()
        {
            Debug.Assert(m_session != null);
            //m_socket.EventDisconnected(m_endpoint, m_handle);
            m_session.Detach();

            //  Cancel all fd subscriptions.
            m_ioObject.RmFd(m_handle);

            //  Disconnect from I/O threads poller object.
            m_ioObject.Unplug();

            //  Disconnect from session object.
            if (m_decoder != null)
            {
                m_decoder.SetMsgSink(null);
            }

            m_session = null;

            Destroy();
        }