Skip to content

Commit 2b18d31

Browse files
authored
Add undocumented docs for Quic and Http (#10301)
Add undocumented docs for Quic and Http
2 parents 3b11856 + 249fb1b commit 2b18d31

File tree

5 files changed

+47
-33
lines changed

5 files changed

+47
-33
lines changed

xml/System.Net.Http/HttpContent.xml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -794,10 +794,15 @@ When the `disposing` parameter is `true`, this method releases all resources hel
794794
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="0" FrameworkAlternate="net-9.0" />
795795
</Parameters>
796796
<Docs>
797-
<param name="cancellationToken">To be added.</param>
798-
<summary>To be added.</summary>
799-
<returns>To be added.</returns>
800-
<remarks>To be added.</remarks>
797+
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
798+
<summary>Serialize the HTTP content to a memory buffer as an asynchronous operation.</summary>
799+
<returns>The task object representing the asynchronous operation.</returns>
800+
<remarks>
801+
<para>This operation will not block. The returned <see cref="T:System.Threading.Tasks.Task" /> object will complete after all of the content has been serialized to the memory buffer.</para>
802+
<para>After content is serialized to a memory buffer, calls to one of the <see cref="M:System.Net.Http.HttpContent.CopyToAsync(System.IO.Stream)" /> methods will copy the content of the memory buffer to the target stream.</para>
803+
</remarks>
804+
<exception cref="T:System.OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
805+
<exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception>
801806
</Docs>
802807
</Member>
803808
<Member MemberName="LoadIntoBufferAsync">
@@ -823,11 +828,16 @@ When the `disposing` parameter is `true`, this method releases all resources hel
823828
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="net-9.0" />
824829
</Parameters>
825830
<Docs>
826-
<param name="maxBufferSize">To be added.</param>
827-
<param name="cancellationToken">To be added.</param>
828-
<summary>To be added.</summary>
829-
<returns>To be added.</returns>
830-
<remarks>To be added.</remarks>
831+
<param name="maxBufferSize">The maximum size, in bytes, of the buffer to use.</param>
832+
<param name="cancellationToken">The cancellation token to cancel the operation.</param>
833+
<summary>Serialize the HTTP content to a memory buffer as an asynchronous operation.</summary>
834+
<returns>The task object representing the asynchronous operation.</returns>
835+
<remarks>
836+
<para>This operation will not block. The returned <see cref="T:System.Threading.Tasks.Task" /> object will complete after all of the content has been serialized to the memory buffer.</para>
837+
<para>After content is serialized to a memory buffer, calls to one of the <see cref="M:System.Net.Http.HttpContent.CopyToAsync(System.IO.Stream)" /> methods will copy the content of the memory buffer to the target stream.</para>
838+
</remarks>
839+
<exception cref="T:System.OperationCanceledException">The cancellation token was canceled. This exception is stored into the returned task.</exception>
840+
<exception cref="T:System.ObjectDisposedException">The object has already been disposed.</exception>
831841
</Docs>
832842
</Member>
833843
<Member MemberName="ReadAsByteArrayAsync">

xml/System.Net.Http/SocketsHttpHandler.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,9 @@ The default proxy is used only when <xref:System.Net.Http.SocketsHttpHandler.Use
451451
<ReturnType>System.Boolean</ReturnType>
452452
</ReturnValue>
453453
<Docs>
454-
<summary>To be added.</summary>
454+
<summary>Gets or sets a value that indicates whether additional HTTP/3 connections can be established to the same server.</summary>
455455
<value>To be added.</value>
456-
<remarks>To be added.</remarks>
456+
<remarks>Enabling multiple connections to the same server explicitly goes against <see href="https://www.rfc-editor.org/rfc/rfc9114.html#section-3.3-4">RFC 9114 - HTTP/3</see>.</remarks>
457457
</Docs>
458458
</Member>
459459
<Member MemberName="Expect100ContinueTimeout">

xml/System.Net.Quic/QuicConnectionOptions.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ To use a different close error code, call <xref:System.Net.Quic.QuicConnection.C
241241
<ReturnType>System.Action&lt;System.Net.Quic.QuicConnection,System.Net.Quic.QuicStreamCapacityChangedArgs&gt;</ReturnType>
242242
</ReturnValue>
243243
<Docs>
244-
<summary>To be added.</summary>
244+
<summary>
245+
<para>Optional callback that is invoked when new stream limit is released by the peer. Corresponds to receiving a MAX_STREAMS frame.</para>
246+
<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>
247+
<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>
248+
</summary>
245249
<value>To be added.</value>
246250
<remarks>To be added.</remarks>
247251
</Docs>

xml/System.Net.Quic/QuicStream.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
<Docs>
2929
<summary>Represents a QUIC stream. <see cref="T:System.Net.Quic.QuicStream" /> can be <see cref="F:System.Net.Quic.QuicStreamType.Unidirectional">unidirectional</see>, that is, write-only for the opening side, or <see cref="F:System.Net.Quic.QuicStreamType.Bidirectional">bidirectional</see>, which allows both sides to write.</summary>
3030
<remarks>
31-
<see cref="T:System.Net.Quic.QuicStream" /> can be used in a same way as any other <see cref="T:System.IO.Stream" />.
32-
33-
Apart from a stream API, <see cref="T:System.Net.Quic.QuicStream" /> also exposes QUIC-specific features:
34-
31+
<see cref="T:System.Net.Quic.QuicStream" /> can be used in a same way as any other <see cref="T:System.IO.Stream" />.
32+
33+
Apart from a stream API, <see cref="T:System.Net.Quic.QuicStream" /> also exposes QUIC-specific features:
34+
3535
<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>
3636
<related type="Article" href="https://www.rfc-editor.org/rfc/rfc9000.html#name-streams">RFC 9000: Streams</related>
3737
</Docs>
@@ -62,12 +62,12 @@ Apart from a stream API, <see cref="T:System.Net.Quic.QuicStream" /> also expose
6262
<param name="errorCode">The error code with which to abort the stream. This value is application-protocol (which is the layer above QUIC) dependent.</param>
6363
<summary>Aborts either the <see cref="F:System.Net.Quic.QuicAbortDirection.Read">reading</see>, <see cref="F:System.Net.Quic.QuicAbortDirection.Write">writing</see>, or <see cref="F:System.Net.Quic.QuicAbortDirection.Both">both</see> sides of the stream.</summary>
6464
<remarks>
65-
<format type="text/markdown"><![CDATA[
66-
67-
## Remarks
68-
69-
Corresponds to [STOP_SENDING](https://www.rfc-editor.org/rfc/rfc9000.html#frame-stop-sending) and [RESET_STREAM](https://www.rfc-editor.org/rfc/rfc9000.html#frame-reset-stream) QUIC frames.
70-
65+
<format type="text/markdown"><![CDATA[
66+
67+
## Remarks
68+
69+
Corresponds to [STOP_SENDING](https://www.rfc-editor.org/rfc/rfc9000.html#frame-stop-sending) and [RESET_STREAM](https://www.rfc-editor.org/rfc/rfc9000.html#frame-reset-stream) QUIC frames.
70+
7171
]]></format>
7272
</remarks>
7373
</Docs>
@@ -293,14 +293,14 @@ Corresponds to [STOP_SENDING](https://www.rfc-editor.org/rfc/rfc9000.html#frame-
293293
<Docs>
294294
<summary>Gracefully completes the writing side of the stream.</summary>
295295
<remarks>
296-
<format type="text/markdown"><![CDATA[
297-
298-
## Remarks
299-
300-
Corresponds to an empty [STREAM](https://www.rfc-editor.org/rfc/rfc9000.html#frame-stream) frame with `FIN` flag set to `true`.
301-
302-
Equivalent to using <xref:System.Net.Quic.QuicStream.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Boolean,System.Threading.CancellationToken)> with `completeWrites: true`.
303-
296+
<format type="text/markdown"><![CDATA[
297+
298+
## Remarks
299+
300+
Corresponds to an empty [STREAM](https://www.rfc-editor.org/rfc/rfc9000.html#frame-stream) frame with `FIN` flag set to `true`.
301+
302+
Equivalent to using <xref:System.Net.Quic.QuicStream.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Boolean,System.Threading.CancellationToken)> with `completeWrites: true`.
303+
304304
]]></format>
305305
</remarks>
306306
</Docs>

xml/System.Net.Quic/QuicStreamCapacityChangedArgs.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</Attribute>
2121
</Attributes>
2222
<Docs>
23-
<summary>To be added.</summary>
23+
<summary>Arguments for <see cref="P:System.Net.Quic.QuicConnectionOptions.StreamCapacityCallback" />.</summary>
2424
<remarks>To be added.</remarks>
2525
</Docs>
2626
<Members>
@@ -40,7 +40,7 @@
4040
<ReturnType>System.Int32</ReturnType>
4141
</ReturnValue>
4242
<Docs>
43-
<summary>To be added.</summary>
43+
<summary>The increment saying how many additional bidirectional streams can be opened on the connection, increased via the latest MAX_STREAMS frame.</summary>
4444
<value>To be added.</value>
4545
<remarks>To be added.</remarks>
4646
</Docs>
@@ -61,7 +61,7 @@
6161
<ReturnType>System.Int32</ReturnType>
6262
</ReturnValue>
6363
<Docs>
64-
<summary>To be added.</summary>
64+
<summary>The increment saying how many additional unidirectional streams can be opened on the connection, increased via the latest MAX_STREAMS frame.</summary>
6565
<value>To be added.</value>
6666
<remarks>To be added.</remarks>
6767
</Docs>

0 commit comments

Comments
 (0)