From 58ce18fdd24bd9cf8ee3a840af6fb6cccdd7715c Mon Sep 17 00:00:00 2001 From: Will Godbe Date: Thu, 12 Aug 2021 15:45:41 -0700 Subject: [PATCH] Add Backlog to QuicTransportOptions --- .../Transport.Quic/src/Internal/QuicConnectionListener.cs | 1 + .../Kestrel/Transport.Quic/src/PublicAPI.Unshipped.txt | 2 ++ .../Kestrel/Transport.Quic/src/QuicTransportOptions.cs | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionListener.cs b/src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionListener.cs index 9a9528bc04a9..38e9b26a1933 100644 --- a/src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionListener.cs +++ b/src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionListener.cs @@ -58,6 +58,7 @@ public QuicConnectionListener(QuicTransportOptions options, IQuicTrace log, EndP quicListenerOptions.IdleTimeout = options.IdleTimeout; quicListenerOptions.MaxBidirectionalStreams = options.MaxBidirectionalStreamCount; quicListenerOptions.MaxUnidirectionalStreams = options.MaxUnidirectionalStreamCount; + quicListenerOptions.ListenBacklog = options.Backlog; _listener = new QuicListener(quicListenerOptions); diff --git a/src/Servers/Kestrel/Transport.Quic/src/PublicAPI.Unshipped.txt b/src/Servers/Kestrel/Transport.Quic/src/PublicAPI.Unshipped.txt index 4ab5cd10661e..3abb58e9da0a 100644 --- a/src/Servers/Kestrel/Transport.Quic/src/PublicAPI.Unshipped.txt +++ b/src/Servers/Kestrel/Transport.Quic/src/PublicAPI.Unshipped.txt @@ -26,6 +26,8 @@ *REMOVED*~static Microsoft.AspNetCore.Hosting.WebHostBuilderMsQuicExtensions.UseQuic(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder) -> Microsoft.AspNetCore.Hosting.IWebHostBuilder Microsoft.AspNetCore.Hosting.WebHostBuilderQuicExtensions Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions +Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.Backlog.get -> int +Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.Backlog.set -> void Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.IdleTimeout.get -> System.TimeSpan Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.IdleTimeout.set -> void Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.MaxBidirectionalStreamCount.get -> ushort diff --git a/src/Servers/Kestrel/Transport.Quic/src/QuicTransportOptions.cs b/src/Servers/Kestrel/Transport.Quic/src/QuicTransportOptions.cs index 8283fed106a2..eaba22f9770c 100644 --- a/src/Servers/Kestrel/Transport.Quic/src/QuicTransportOptions.cs +++ b/src/Servers/Kestrel/Transport.Quic/src/QuicTransportOptions.cs @@ -38,6 +38,11 @@ public class QuicTransportOptions /// public long? MaxWriteBufferSize { get; set; } = 64 * 1024; + /// + /// The maximum length of the pending connection queue. + /// + public int Backlog { get; set; } = 512; + internal ISystemClock SystemClock = new SystemClock(); } }