From 8e3034943e8aac7fa0326d1bb43703f42472a1b9 Mon Sep 17 00:00:00 2001 From: ManickaP Date: Fri, 10 Jan 2025 18:36:06 +0100 Subject: [PATCH] Listener options --- .../networking/quic/quic-options.md | 23 +++++++++++++++++++ docs/fundamentals/toc.yml | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 docs/fundamentals/networking/quic/quic-options.md diff --git a/docs/fundamentals/networking/quic/quic-options.md b/docs/fundamentals/networking/quic/quic-options.md new file mode 100644 index 0000000000000..34eb6b0e4906a --- /dev/null +++ b/docs/fundamentals/networking/quic/quic-options.md @@ -0,0 +1,23 @@ +--- +title: QUIC configuration options in .NET +description: Learn details about the configuration for QUIC protocol in .NET. +ms.date: 01/11/2025 +--- +# QUIC configuration options + +`System.Net.Quic` library uses options classes to configure the protocol objects ( and ) before their construction and initialization. There are three different options classes to do that: + +- : to configure before starting with +- : to configure outgoing before establishing it via +- : to configure incoming before handing it out from + +All of the options classes can be set up incrementally, meaning that they do not require any of their properties to be initialized via constructor. But the moment they are being used to configure a new listener or a connection, the options are validated and an appropriate type of is thrown for any missing mandatory values or misconfigured ones. For example, if mandatory is not set, calling will throw . + +## `QuicListenerOptions` + +These options are used in when starting a new . The individual configuration properties are: + +- : defines the application protocols accepted by this server ([RFC 7301 - ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)). It can contain multiple values for different protocols that might not be related. In the process of accepting a new connection, listener can narrow down or select one specific protocol for each incoming connection, see . **This property is mandatory and must contains at least one value.** +- : delegate to choose for an incoming connection. The function is given (not fully initialized yet) and containing the server name requested by the client ([RFC 6066 - SNI](https://www.rfc-editor.org/rfc/rfc6066.html#section-3)). The delegate is invoked for each incoming connection. It can return different options based on the client info provided or it can safely return the very same instance of the options every time. The delegate purpose and shape is intentionally similar to used in . **This property is mandatory.** +- : determines how many incoming connections can be held by the listener before they start being refused. Every attempt to establish a connection counts, even when it fails or when the connection gets shut down while waiting in the accept queue. Ongoing processes to establish a new connection count towards this limit as well. Connections or connection attempts are counted until they are retrieved via . The purpose of the backlog limit is to prevent servers from being overwhelmed by more incoming connections than it can process. **This property is optional, default is 512.** +- : IP address and port on which the listener will accept new connections. Due to underlying implementation, `MsQuic`, the listener will always bind to dual-stack wildcard socket regardless to what is specified here. This can lead to some unexpected behaviors, especially in comparison with ordinary TCP sockets like in HTTP/1.1 and HTTP/2 cases. Please see [QUIC Troubleshooting Guide](quic-troubleshooting.md) for more details. **This property is mandatory.** diff --git a/docs/fundamentals/toc.yml b/docs/fundamentals/toc.yml index f3c21c755d52a..bbd82fe1ce5c5 100644 --- a/docs/fundamentals/toc.yml +++ b/docs/fundamentals/toc.yml @@ -1152,6 +1152,8 @@ items: items: - name: QUIC support href: networking/quic/quic-overview.md + - name: QUIC configuration options + href: networking/quic/quic-options.md - name: QUIC troubleshooting href: networking/quic/quic-troubleshooting.md - name: Telemetry