Closed
Description
Background and Motivation
dotnet/runtime is adding an API to control the keep-alive timeout see dotnet/runtime#48729 (comment)
Our WebSocket middleware exposes options to control the websocket options being used so we would want to expose an equivalent option.
Proposed API
namespace Microsoft.AspNetCore.Builder;
public class WebSocketOptions
{
public TimeSpan KeepAliveInterval { get; set; }
+ public TimeSpan KeepAliveTimeout { get; set; }
}
Usage Examples
builder.AddWebSockets(o =>
{
o.KeepAliveTimeout = TimeSpan.FromMinutes(1);
});