Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
In connection with YARP i need to ability to open/close ports in runtime via code.
Issue that i have custom handlers for ListenAnyIP.
I do
builder.WebHost.UseKestrel(options =>
{
options.ListenAnyIP(80, lo => {...});
options.ListenAnyIP(443, lo => {...});
});
I found that this is possible via configuration, but that not compatible with manual settings for kestrel.
Describe the solution you'd like
Something like request IListenManager from DI
then call
manager.StopListenAnyIP(80);
manager.StartListenAnyIP(80, (ListenOptions lo) => {...});//usual setup of port goes here
Something like this.
Additional context
No response