public override void Configure(ISuperSocketHostBuilder hostBuilder) { hostBuilder.ConfigureServices((ctx, services) => { services.Configure <ServerOptions>((options) => { var listener = options.Listeners[0]; }); }); hostBuilder.UseGZip(); base.Configure(hostBuilder); }
public override void Configure(ISuperSocketHostBuilder hostBuilder) { hostBuilder.ConfigureServices((ctx, services) => { services.Configure <ServerOptions>((options) => { var listener = options.Listeners[0]; if (listener.Security == SslProtocols.None) { listener.Security = GetServerEnabledSslProtocols(); } listener.CertificateOptions = new CertificateOptions { FilePath = "supersocket.pfx", Password = "******" }; }); }); hostBuilder.UseGZip(); base.Configure(hostBuilder); }