Skip to content

Commit b1dc5b4

Browse files
ManickaPgewarren
andauthored
[QUIC] Options classes fixes (#10828)
* Listener options fixes * Windows sizes power of 2 constraint * Small fixes * Removed non-existing namespace * Added links to conceptual docs * RFC link * callback details in summary * Links to conceptual docs for options classes * Update xml/System.Net.Quic/QuicClientConnectionOptions.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Net.Quic/QuicConnection.xml Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Net.Quic/QuicConnectionOptions.xml Co-authored-by: Genevieve Warren <[email protected]> * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Genevieve Warren <[email protected]>
1 parent 601c540 commit b1dc5b4

10 files changed

+29
-25
lines changed

xml/System.Net.Quic/QuicClientConnectionOptions.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<Docs>
2525
<summary>Options for client (outbound) <see cref="T:System.Net.Quic.QuicConnection">Quic connections</see>.</summary>
2626
<remarks>To be added.</remarks>
27+
<related type="Article" href="/dotnet/fundamentals/networking/quic/quic-options#quicclientconnectionoptions">Detailed documentation for QuicClientConnectionOptions</related>
2728
</Docs>
2829
<Members>
2930
<Member MemberName=".ctor">

xml/System.Net.Quic/QuicConnection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ For QUIC prerequisites and supported operating systems, see [Platform dependenci
4141
]]></format>
4242
</remarks>
4343
<related type="Article" href="https://www.rfc-editor.org/rfc/rfc9000.html#name-connections">RFC 9000: Connections</related>
44+
<related type="Article" href="/dotnet/fundamentals/networking/quic/quic-overview#quicconnection">Guidelines for using QuicConnection</related>
4445
</Docs>
4546
<Members>
4647
<Member MemberName="AcceptInboundStreamAsync">

xml/System.Net.Quic/QuicConnectionOptions.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<Docs>
2525
<summary>Shared options for both client (outbound) and server (inbound) <see cref="T:System.Net.Quic.QuicConnection">Quic connections</see>.</summary>
2626
<remarks>To be added.</remarks>
27+
<related type="Article" href="/dotnet/fundamentals/networking/quic/quic-options#quicconnectionoptions">Detailed documentation for QuicConnectionOptions</related>
2728
</Docs>
2829
<Members>
2930
<Member MemberName="DefaultCloseErrorCode">
@@ -164,8 +165,8 @@ To use a different close error code, call <xref:System.Net.Quic.QuicConnection.C
164165
<ReturnType>System.TimeSpan</ReturnType>
165166
</ReturnValue>
166167
<Docs>
167-
<summary>Gets or sets the interval at which keep-alive packets are sent on the connection.</summary>
168-
<value>The interval at which keep-alive packets are sent on the connection. The default value is <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" />, which means keep-alive packets are never sent.</value>
168+
<summary>Gets or sets the interval at which PING frames are sent on the connection.</summary>
169+
<value>The interval at which PING frames are sent on the connection. The default value is <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" />, which means PING frames are never sent.</value>
169170
<remarks>A value of <see cref="F:System.TimeSpan.Zero" /> means use the underlying implementation default timeout.</remarks>
170171
</Docs>
171172
</Member>
@@ -239,11 +240,12 @@ To use a different close error code, call <xref:System.Net.Quic.QuicConnection.C
239240
<Docs>
240241
<summary>
241242
<para>Optional callback that is invoked when new stream limit is released by the peer. Corresponds to receiving a MAX_STREAMS frame.</para>
242-
<para>The callback values represent increments of stream limits, e.g.: current limit is 10 bidirectional streams, callback arguments notify 5 more additional bidirectional streams =&gt; 15 bidirectional streams can be opened in total at the moment.</para>
243-
<para>The initial capacity is reported with the first invocation of the callback that might happen before the <see cref="T:System.Net.Quic.QuicConnection" /> instance is handed out via either <see cref="M:System.Net.Quic.QuicConnection.ConnectAsync(System.Net.Quic.QuicClientConnectionOptions,System.Threading.CancellationToken)" /> or <see cref="M:System.Net.Quic.QuicListener.AcceptConnectionAsync(System.Threading.CancellationToken)" />.</para>
244243
</summary>
245244
<value>To be added.</value>
246-
<remarks>To be added.</remarks>
245+
<remarks>
246+
<para>The callback values represent increments of stream limits. For example, if the current limit is 10 bidirectional streams, and callback arguments notify 5 more additional bidirectional streams, then 15 bidirectional streams can be opened in total at the moment.</para>
247+
<para>The initial capacity is reported with the first invocation of the callback, which might happen before the <see cref="T:System.Net.Quic.QuicConnection" /> instance is handed out via either <see cref="M:System.Net.Quic.QuicConnection.ConnectAsync(System.Net.Quic.QuicClientConnectionOptions,System.Threading.CancellationToken)" /> or <see cref="M:System.Net.Quic.QuicListener.AcceptConnectionAsync(System.Threading.CancellationToken)" />.</para>
248+
</remarks>
247249
</Docs>
248250
</Member>
249251
</Members>

xml/System.Net.Quic/QuicListener.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ For QUIC prerequisites and supported operating systems, see [Platform dependenci
3939
]]></format>
4040
</remarks>
4141
<related type="Article" href="https://www.rfc-editor.org/rfc/rfc9000.html#name-connections">RFC 9000: Connections</related>
42+
<related type="Article" href="/dotnet/fundamentals/networking/quic/quic-overview#quiclistener">Guidelines for using QuicListener</related>
4243
</Docs>
4344
<Members>
4445
<Member MemberName="AcceptConnectionAsync">
@@ -69,9 +70,10 @@ For QUIC prerequisites and supported operating systems, see [Platform dependenci
6970
7071
## Remarks
7172
72-
<xref:System.Net.Quic.QuicListener> doesn't have a mechanism to report inbound connections that fail the handshake process. Such connections are only logged by the listener and never surfaced on the outside.
73-
74-
This method propagates exceptions from <xref:System.Net.Quic.QuicListenerOptions.ConnectionOptionsCallback>, including validation errors from misconfigured <xref:System.Net.Quic.QuicServerConnectionOptions>, for example, <xref:System.ArgumentException>. It also propagates exceptions from failed connection handshakes, for example, <xref:System.Security.Authentication.AuthenticationException> and <xref:System.Net.Quic.QuicException>.
73+
This method also propagates exceptions from the process of establishing a connection, including:
74+
- Errors from <xref:System.Net.Quic.QuicListenerOptions.ConnectionOptionsCallback> as <xref:System.Net.Quic.QuicException> with <xref:System.Net.Quic.QuicError.CallbackError> error type.
75+
- Validation errors from misconfigured <xref:System.Net.Quic.QuicServerConnectionOptions> returned by <xref:System.Net.Quic.QuicListenerOptions.ConnectionOptionsCallback> as <xref:System.ArgumentException>.
76+
- Exceptions from failed connection handshakes as <xref:System.Security.Authentication.AuthenticationException> or <xref:System.Net.Quic.QuicException>.
7577
7678
]]></format>
7779
</remarks>

xml/System.Net.Quic/QuicListenerOptions.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
</Attribute>
2323
</Attributes>
2424
<Docs>
25-
<summary>Options to provide to a <see cref="T:System.Net.Quic.QuicListener" />.</summary>
25+
<summary>Options to configure a new <see cref="T:System.Net.Quic.QuicListener" />.</summary>
2626
<remarks>To be added.</remarks>
27+
<related type="Article" href="/dotnet/fundamentals/networking/quic/quic-options#quiclisteneroptions">Detailed documentation for QuicListenerOptions</related>
2728
</Docs>
2829
<Members>
2930
<Member MemberName=".ctor">
@@ -65,7 +66,7 @@
6566
<Docs>
6667
<summary>Gets or sets the list of application protocols that the listener will accept. At least one must be specified.</summary>
6768
<value>To be added.</value>
68-
<remarks>This property is mandatory, and not setting it will result in validation errors when starting the listener.</remarks>
69+
<remarks>This property is mandatory. Not setting it or not specifying at least one value will result in validation errors when starting the listener.</remarks>
6970
</Docs>
7071
</Member>
7172
<Member MemberName="ConnectionOptionsCallback">
@@ -92,9 +93,9 @@
9293
<ReturnType>System.Func&lt;System.Net.Quic.QuicConnection,System.Net.Security.SslClientHelloInfo,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask&lt;System.Net.Quic.QuicServerConnectionOptions&gt;&gt;</ReturnType>
9394
</ReturnValue>
9495
<Docs>
95-
<summary>Gets or sets the selection callback to choose inbound connection options dynamically.</summary>
96+
<summary>Gets or sets the selection callback to choose inbound connection options.</summary>
9697
<value>To be added.</value>
97-
<remarks>To be added.</remarks>
98+
<remarks>This property is mandatory. Not setting it will result in validation errors when starting the listener.</remarks>
9899
</Docs>
99100
</Member>
100101
<Member MemberName="ListenBacklog">
@@ -115,7 +116,7 @@
115116
<ReturnType>System.Int32</ReturnType>
116117
</ReturnValue>
117118
<Docs>
118-
<summary>Gets or sets the number of connections to be held without accepting any of them, that is, the maximum size of the pending connection queue.</summary>
119+
<summary>Gets or sets the number of connections to be held without accepting any of them. That is, the maximum size of the pending connection queue.</summary>
119120
<value>To be added.</value>
120121
<remarks>To be added.</remarks>
121122
</Docs>
@@ -140,7 +141,7 @@
140141
<Docs>
141142
<summary>Gets or sets the endpoint to listen on.</summary>
142143
<value>To be added.</value>
143-
<remarks>This property is mandatory, and not setting it will result in validation errors when starting the listener.</remarks>
144+
<remarks>This property is mandatory. Not setting it will result in validation errors when starting the listener.</remarks>
144145
</Docs>
145146
</Member>
146147
</Members>

xml/System.Net.Quic/QuicReceiveWindowSizes.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<Docs>
5454
<summary>Gets or sets the initial flow-control window size for the connection.</summary>
5555
<value>To be added.</value>
56-
<remarks>To be added.</remarks>
56+
<remarks>Must be non-negative power of 2.</remarks>
5757
</Docs>
5858
</Member>
5959
<Member MemberName="LocallyInitiatedBidirectionalStream">
@@ -74,7 +74,7 @@
7474
<Docs>
7575
<summary>Gets or sets the initial flow-control window size for locally initiated bidirectional streams.</summary>
7676
<value>To be added.</value>
77-
<remarks>To be added.</remarks>
77+
<remarks>Must be non-negative power of 2.</remarks>
7878
</Docs>
7979
</Member>
8080
<Member MemberName="RemotelyInitiatedBidirectionalStream">
@@ -95,7 +95,7 @@
9595
<Docs>
9696
<summary>Gets or sets the initial flow-control window size for remotely initiated bidirectional streams.</summary>
9797
<value>To be added.</value>
98-
<remarks>To be added.</remarks>
98+
<remarks>Must be non-negative power of 2.</remarks>
9999
</Docs>
100100
</Member>
101101
<Member MemberName="UnidirectionalStream">
@@ -116,7 +116,7 @@
116116
<Docs>
117117
<summary>Gets or sets the initial flow-control window size for (remotely initiated) unidirectional streams.</summary>
118118
<value>To be added.</value>
119-
<remarks>To be added.</remarks>
119+
<remarks>Must be non-negative power of 2.</remarks>
120120
</Docs>
121121
</Member>
122122
</Members>

xml/System.Net.Quic/QuicServerConnectionOptions.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<Docs>
2525
<summary>Options for server (inbound) <see cref="T:System.Net.Quic.QuicConnection">Quic connections</see>. These options are provided by <see cref="P:System.Net.Quic.QuicListenerOptions.ConnectionOptionsCallback" />.</summary>
2626
<remarks>To be added.</remarks>
27+
<related type="Article" href="/dotnet/fundamentals/networking/quic/quic-options#quicserverconnectionoptions">Detailed documentation for QuicServerConnectionOptions</related>
2728
</Docs>
2829
<Members>
2930
<Member MemberName=".ctor">

xml/System.Net.Quic/QuicStream.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Apart from a stream API, <see cref="T:System.Net.Quic.QuicStream" /> also expose
3030

3131
<list type="bullet"><item><term><see cref="M:System.Net.Quic.QuicStream.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Boolean,System.Threading.CancellationToken)" /></term><description>Closes the writing side of the stream as a single operation with the write itself.</description></item><item><term><see cref="M:System.Net.Quic.QuicStream.CompleteWrites" /></term><description>Closes the writing side of the stream.</description></item><item><term><see cref="M:System.Net.Quic.QuicStream.Abort(System.Net.Quic.QuicAbortDirection,System.Int64)" /></term><description>Aborts either the writing or the reading side of the stream.</description></item><item><term><see cref="M:System.Net.Quic.QuicStream.WritesClosed" /></term><description>Returns a <see cref="T:System.Threading.Tasks.Task" /> that will complete when the stream writing side has been closed (gracefully or abortively).</description></item><item><term><see cref="P:System.Net.Quic.QuicStream.ReadsClosed" /></term><description>Returns a <see cref="T:System.Threading.Tasks.Task" /> that will complete when the stream reading side has been closed (gracefully or abortively).</description></item></list></remarks>
3232
<related type="Article" href="https://www.rfc-editor.org/rfc/rfc9000.html#name-streams">RFC 9000: Streams</related>
33+
<related type="Article" href="/dotnet/fundamentals/networking/quic/quic-overview#quicstream">Guidelines for using QuicStream</related>
3334
</Docs>
3435
<Members>
3536
<Member MemberName="Abort">

xml/ns-System.Net.Quic.Implementations.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

xml/ns-System.Net.Quic.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Namespace Name="System.Net.Quic">
22
<Docs>
3-
<summary>Contains types that implement the QUIC protocol specified by RFC 9000.</summary>
3+
<summary>Contains types that implement the QUIC protocol specified by <see href="https://www.rfc-editor.org/rfc/rfc9000.html">RFC 9000</see>.</summary>
44
<remarks>To be added.</remarks>
5+
<related type="Article" href="/dotnet/fundamentals/networking/quic/quic-overview">QUIC in .NET</related>
56
</Docs>
67
</Namespace>

0 commit comments

Comments
 (0)