public SniHandler(Func <Stream, SslStream> sslStreamFactory, ServerTlsSniSettings settings) { Contract.Requires(settings != null); Contract.Requires(sslStreamFactory != null); this.sslStreamFactory = sslStreamFactory; this.serverTlsSniSettings = settings; }
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; }
public SniHandler(ServerTlsSniSettings settings) : this(stream => new SslStream(stream, true), settings) { }