private void Unplug() { Debug.Assert(m_plugged); m_plugged = false; // remove handle from proactor. if (m_ioEnabled) { m_ioObject.RemoveSocket(m_handle); m_ioEnabled = false; } // Disconnect from I/O threads poller object. m_ioObject.Unplug(); m_state = State.Closed; // Disconnect from session object. if (m_encoder != null) { m_encoder.SetMsgSource(null); } if (m_decoder != null) { m_decoder.SetMsgSink(null); } m_session = null; }
protected override void ProcessTerm(int linger) { m_ioObject.SetHandler(this); m_ioObject.RemoveSocket(m_handle); Close(); base.ProcessTerm(linger); }
protected override void ProcessTerm(int linger) { if (m_timerStarted) { m_ioObject.CancelTimer(ReconnectTimerId); m_timerStarted = false; } if (m_handleValid) { m_ioObject.RemoveSocket(m_s); m_handleValid = false; } if (m_s != null) { Close(); } base.ProcessTerm(linger); }
private void Error() { Debug.Assert(m_session != null); m_session.Detach(); m_ioObject.RemoveSocket(m_handle); // Disconnect from I/O threads poller object. m_ioObject.Unplug(); m_session = null; m_state = State.Error; Destroy(); }