Ejemplo n.º 1
0
        public TlsHandler(Func <Stream, SslStream> sslStreamFactory, TlsSettings settings)
        {
            Contract.Requires(sslStreamFactory != null);
            Contract.Requires(settings != null);

            this.settings        = settings;
            this.closeFuture     = new TaskCompletionSource();
            this.mediationStream = new MediationStream(this);
            this.sslStream       = sslStreamFactory(this.mediationStream);
        }
Ejemplo n.º 2
0
 public TlsHandler(TlsSettings settings)
     : this(stream => new SslStream(stream, false), settings)
 {
 }