12345678910111213141516171819202122232425262728293031323334353637383940414243 |
-
- using System.Net;
- using Microsoft.AspNetCore.Connections;
- Console.WriteLine("Hello, World!");
- var host = Host.CreateDefaultBuilder()
-
-
-
-
-
- .ConfigureWebHostDefaults(webBuilder =>
- {
- webBuilder
- .UseUrls()
-
-
-
-
-
-
- .UseKestrel(kop =>
- {
- kop.Listen(new IPEndPoint(IPAddress.Any, 8000),
- lop => lop.Use(
- async (ConnectionContext context, ConnectionDelegate next) => await connectionHandler(context)
- )
- );
- });
- })
- .Build();
- await host.StartAsync();
- static async Task<object> connectionHandler(ConnectionContext connectionContext)
- {
- throw new NotImplementedException();
- }
|