public void DetachFromPoller()
        {
            if (m_attachedPoller == null)
            {
                throw new InvalidOperationException("Not attached to a poller");
            }

            m_attachedPoller.Remove(m_monitoringSocket);
            m_attachedPoller = null;
            InternalClose();
        }
示例#2
0
        private void DetachFromPoller(bool dispose)
        {
            if (m_attachedPoller == null)
            {
                throw new InvalidOperationException("Not attached to a poller");
            }

            if (dispose)
            {
                m_attachedPoller.RemoveAndDispose(m_monitoringSocket);
            }
            else
            {
                m_attachedPoller.Remove(m_monitoringSocket);
            }
            m_attachedPoller = null;
            InternalClose();
        }