internal void StartReaping([NotNull] Utils.Poller poller)
{
// Plug the socket to the reaper thread.
m_poller = poller;
m_handle = m_mailbox.Handle;
m_poller.AddHandle(m_handle, this);
m_poller.SetPollIn(m_handle);
// Initialise the termination and check whether it can be deallocated
// immediately.
Terminate();
CheckDestroy();
}
/// <summary> /// Add the given socket to the list to be reaped (terminated). /// </summary> /// <param name="socket">the socket to add to the list for termination</param> protected override void ProcessReap(SocketBase socket) { // Add the socket to the poller. socket.StartReaping(m_poller); ++m_sockets; }