Skip to content

Commit c4690bf

Browse files
authored
Add Backlog to QuicTransportOptions (dotnet#35312)
1 parent 5dc3a5c commit c4690bf

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionListener.cs

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public QuicConnectionListener(QuicTransportOptions options, IQuicTrace log, EndP
5858
quicListenerOptions.IdleTimeout = options.IdleTimeout;
5959
quicListenerOptions.MaxBidirectionalStreams = options.MaxBidirectionalStreamCount;
6060
quicListenerOptions.MaxUnidirectionalStreams = options.MaxUnidirectionalStreamCount;
61+
quicListenerOptions.ListenBacklog = options.Backlog;
6162

6263
_listener = new QuicListener(quicListenerOptions);
6364

src/Servers/Kestrel/Transport.Quic/src/PublicAPI.Unshipped.txt

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*REMOVED*~static Microsoft.AspNetCore.Hosting.WebHostBuilderMsQuicExtensions.UseQuic(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder) -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
2727
Microsoft.AspNetCore.Hosting.WebHostBuilderQuicExtensions
2828
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions
29+
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.Backlog.get -> int
30+
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.Backlog.set -> void
2931
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.IdleTimeout.get -> System.TimeSpan
3032
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.IdleTimeout.set -> void
3133
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions.MaxBidirectionalStreamCount.get -> ushort

src/Servers/Kestrel/Transport.Quic/src/QuicTransportOptions.cs

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ public class QuicTransportOptions
4040
/// </summary>
4141
public long? MaxWriteBufferSize { get; set; } = 64 * 1024;
4242

43+
/// <summary>
44+
/// The maximum length of the pending connection queue.
45+
/// </summary>
46+
public int Backlog { get; set; } = 512;
47+
4348
internal ISystemClock SystemClock = new SystemClock();
4449
}
4550
}

0 commit comments

Comments
 (0)