/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/SignalR/samples/SignalRSamples/Program.cs
48 строк
2 KB
Brennan
[SignalR] Seamless Reconnect (#48338)
26 май 2023, 03:27
Не верифицирован
26 май 2023, 03:27
f56c242
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Net; using Microsoft.AspNetCore.SignalR; using SignalRSamples.Hubs; namespace SignalRSamples; public class Program { public static Task Main(string[] args) { var config = new ConfigurationBuilder() .AddCommandLine(args) .Build(); var host = Host.CreateDefaultBuilder(args) .ConfigureWebHost(webHostBuilder => { webHostBuilder .UseConfiguration(config) .UseSetting(WebHostDefaults.PreventHostingStartupKey, "true") .ConfigureLogging((c, factory) => { factory.AddConfiguration(c.Configuration.GetSection("Logging")); factory.AddConsole(); factory.SetMinimumLevel(LogLevel.Debug); }) .UseKestrel(options => { // Default port options.ListenAnyIP(5000); // Hub bound to TCP end point //options.Listen(IPAddress.Any, 9001, builder => //{ // builder.UseHub<Chat>(); //}); }) .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup<Startup>(); }).Build(); return host.RunAsync(); } }