/// <summary>
        /// startup the ssl security provider.<para/>
        /// must invoke it before start server.<para/>
        /// the underlayer transport must be TcpServer.
        /// </summary>
        /// <param name="certificate">
        /// a X509Certificate that specifies the certificate used to authenticate the server.
        /// </param>
        /// <param name="clientCertificateRequired">
        /// A Boolean value that specifies whether the client must supply a certificate for authentication.
        /// </param>
        /// <param name="enabledSslProtocols">
        /// The SslProtocols value that represents the protocol used for authentication.
        /// </param>
        /// <exception cref="ObjectDisposedException">
        /// thrown when this object is disposed.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// thrown when the server is started, must invoke before Start().
        /// </exception>
        public void Startup(
            X509Certificate certificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("TcpServerTransport");
            }

            if (this.started)
            {
                throw new InvalidOperationException("server is started, must invoke before Start().");
            }

            this.sslProvider = new ServerSslProvider(certificate, enabledSslProtocols, clientCertificateRequired);
        }
        /// <summary>
        /// startup the ssl security provider.<para/>
        /// must invoke it before start server.<para/>
        /// the underlayer transport must be TcpServer.
        /// </summary>
        /// <param name="certificate">
        /// a X509Certificate that specifies the certificate used to authenticate the server.
        /// </param>
        /// <exception cref="ObjectDisposedException">
        /// thrown when this object is disposed.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// thrown when the server is started, must invoke before Start().
        /// </exception>
        public void Startup(X509Certificate certificate)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("TcpServerTransport");
            }

            if (this.started)
            {
                throw new InvalidOperationException("server is started, must invoke before Start().");
            }

            this.sslProvider = new ServerSslProvider(certificate);
        }