我正在努力完成以下任务: 我有一个运行 gRPC 服务的 asp.net core 3.1。
在应用程序的生命周期中,我希望能够暂停/停止端点/服务器监听/接受请求,并在一段时间后恢复它。
只是为了澄清我不想停止这个过程
我找不到任何与之相关的 Kestrel 命令,我们将不胜感激
最佳答案
During the lifetime of the application I want to be able to Pause/Stop the endpoint/Server from listening/accepting requests and after a while resuming it.
这在今天是不可能的,但会在 5.0 中实现。我建议对这个问题发表评论 https://github.com/dotnet/aspnetcore/issues/21244
关于c# - 停止 Kestrel 服务器接受来自代码的请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60927447/