Created
October 1, 2023 12:04
-
-
Save usausa/1189ee926bbc3efd2e23b75079d63eb6 to your computer and use it in GitHub Desktop.
TCP server using Microsoft.AspNetCore.Connections
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = WebApplication.CreateBuilder(args); | |
builder.WebHost.UseKestrel(options => | |
{ | |
options.ListenLocalhost(9999, config => | |
{ | |
config.UseConnectionHandler<MyConnectionHandler>(); | |
}); | |
}); | |
var app = builder.Build(); | |
app.Run(); | |
// Microsoft.AspNetCore.Server.Kestrel: Warning: Overriding address(es) 'https://localhost:5001/, http://localhost:5000/'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead. を消したい | |
// Microsoft.Hosting.Lifetime: Information: Now listening on: http://localhost:8007 とログがhttpで表示されてしまう |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment