コード例 #1
0
 public SniHandler(Func <Stream, SslStream> sslStreamFactory, ServerTlsSniSettings settings)
 {
     Contract.Requires(settings != null);
     Contract.Requires(sslStreamFactory != null);
     this.sslStreamFactory     = sslStreamFactory;
     this.serverTlsSniSettings = settings;
 }
コード例 #2
0
 public SniHandler(Func <Stream, SslStream> sslStreamFactory, ServerTlsSniSettings settings)
 {
     if (settings is null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.settings);
     }
     if (sslStreamFactory is null)
     {
         ThrowHelper.ThrowArgumentNullException(ExceptionArgument.sslStreamFactory);
     }
     _sslStreamFactory     = sslStreamFactory;
     _serverTlsSniSettings = settings;
 }
コード例 #3
0
 public SniHandler(ServerTlsSniSettings settings)
     : this(stream => new SslStream(stream, true), settings)
 {
 }