/// <summary>
        /// Send callback and return whether or not the domain socket was closed as a
        /// result of processing.
        /// </summary>
        /// <param name="caller">reason for call</param>
        /// <param name="entries">mapping of file descriptor to entry</param>
        /// <param name="fdSet">set of file descriptors</param>
        /// <param name="fd">file descriptor</param>
        /// <returns>true if the domain socket was closed as a result of processing</returns>
        private bool SendCallback(string caller, SortedDictionary <int, DomainSocketWatcher.Entry
                                                                   > entries, DomainSocketWatcher.FdSet fdSet, int fd)
        {
            if (Log.IsTraceEnabled())
            {
                Log.Trace(this + ": " + caller + " starting sendCallback for fd " + fd);
            }
            DomainSocketWatcher.Entry entry = entries[fd];
            Preconditions.CheckNotNull(entry, this + ": fdSet contained " + fd + ", which we were "
                                       + "not tracking.");
            DomainSocket sock = entry.GetDomainSocket();

            if (entry.GetHandler().Handle(sock))
            {
                if (Log.IsTraceEnabled())
                {
                    Log.Trace(this + ": " + caller + ": closing fd " + fd + " at the request of the handler."
                              );
                }
                if (Collections.Remove(toRemove, fd) != null)
                {
                    if (Log.IsTraceEnabled())
                    {
                        Log.Trace(this + ": " + caller + " : sendCallback processed fd " + fd + " in toRemove."
                                  );
                    }
                }
                try
                {
                    sock.refCount.UnreferenceCheckClosed();
                }
                catch (IOException)
                {
                    Preconditions.CheckArgument(false, this + ": file descriptor " + sock.fd + " was closed while "
                                                + "still in the poll(2) loop.");
                }
                IOUtils.Cleanup(Log, sock);
                fdSet.Remove(fd);
                return(true);
            }
            else
            {
                if (Log.IsTraceEnabled())
                {
                    Log.Trace(this + ": " + caller + ": sendCallback not " + "closing fd " + fd);
                }
                return(false);
            }
        }