private void AcceptDone(AsyncSocket cliCon)
        {
            cliCon.m_addr     = m_addr;
            cliCon.Address.IP = ((IPEndPoint)cliCon.m_sock.RemoteEndPoint).Address;
            cliCon.State      = SocketState.Connected;

            cliCon.m_stream          = new NetworkStream(cliCon.m_sock);
            cliCon.m_server          = true;
            cliCon.LocalCertificate  = m_cert;
            cliCon.RequireClientCert = m_requireClientCert;

            ISocketEventListener l = m_listener.GetListener(cliCon);

            if (l == null)
            {
                // if the listener returns null, close the socket and
                // quit, instead of asserting.
                cliCon.m_sock.Close();
                RequestAccept();
                return;
            }

            cliCon.m_listener = l;

            try
            {
                if (m_watcher != null)
                {
                    m_watcher.RegisterSocket(cliCon);
                }
            }
            catch (InvalidOperationException)
            {
                // m_watcher out of slots.
                cliCon.AsyncClose();

                // don't set state
                // they really don't need this error, we don't think.
                // Error(e);

                // tell the watcher that when it gets its act together,
                // we'd appreciate it if it would restart the RequestAccept().
                m_watcher.PendingAccept(this);
                return;
            }

            if (m_secureProtocol != SslProtocols.None)
            {
                cliCon.StartTLS();
            }

            if (l.OnAccept(cliCon))
            {
                RequestAccept();
            }
        }