-
Couldn't load subscription status.
- Fork 5.2k
Closed
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Net.Quic
Milestone
Description
Background and motivation
An application protocol such as HTTP/3 needs to enable the transport keep alive to defer the Quic idle timeout (https://quicwg.org/base-drafts/draft-ietf-quic-http.html#name-idle-connections). It should also be able to do so only if there's pending requests or server pushes.
From looking at the msquic implementation, the keep alive interval can be updated on an active Quic connection. So this could be set through a new QuicConnection property.
Such a feature will also probably needed to implement keep alive in System.Net.Http.SocketsHttpHandler.Http3Connection.
API Proposal
namespace System.Net.Quic;
public sealed class QuicConnection : IDisposable
{
// <summary>The keep alive interval to specify how often to send PING frames.</summary>
public TimeSpan KeepAliveInterval { get; set; }
}API Usage
// Enable keep alive
connection.KeepAliveInterval = TimeSpan.FromSeconds(15);
// Disable keep alive
connection.KeepAliveInterval = TimeSpan.MaxValue;Alternative Designs
No response
Risks
No response
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Net.Quic