Exemple #1
0
        protected void ProcessStop()
        {
            m_terminating = true;

            //  If there are no sockets being reaped finish immediately.
            if (m_sockets == 0)
            {
                SendDone();
                m_poller.RemoveFD(m_mailboxHandle);
                m_poller.Stop();
            }
        }
        //  To be called after processing commands or invoking any command
        //  handlers explicitly. If required, it will deallocate the socket.
        private void CheckDestroy()
        {
            //  If the object was already marked as destroyed, finish the deallocation.
            if (m_destroyed)
            {
                //  Remove the socket from the reaper's poller.
                m_poller.RemoveFD(m_handle);
                //  Remove the socket from the context.
                DestroySocket(this);

                //  Notify the reaper about the fact.
                SendReaped();

                //  Deallocate.
                base.ProcessDestroy();
            }
        }
Exemple #3
0
 public void RmFd(System.Net.Sockets.Socket handle)
 {
     m_poller.RemoveFD(handle);
 }
Exemple #4
0
        protected override void ProcessStop()
        {
            m_poller.RemoveFD(m_mailboxHandle);

            m_poller.Stop();
        }