Skip to content

Update comment on return value of NetworkStream.Read* variants #10960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions xml/System.Net.Sockets/NetworkStream.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ The Close method frees both unmanaged and managed resources associated with the
<Docs>
<param name="asyncResult">An <see cref="T:System.IAsyncResult" /> that represents an asynchronous call.</param>
<summary>Handles the end of an asynchronous read.</summary>
<returns>The number of bytes read from the <see cref="T:System.Net.Sockets.NetworkStream" />.</returns>
<returns>The number of bytes read from the <see cref="T:System.Net.Sockets.NetworkStream" />, or 0 if the underlying socket was closed.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -1466,7 +1466,7 @@ The Close method frees both unmanaged and managed resources associated with the
<Docs>
<param name="buffer">A region of memory to store data read from the <see cref="T:System.Net.Sockets.NetworkStream" />.</param>
<summary>Reads data from the <see cref="T:System.Net.Sockets.NetworkStream" /> and stores it to a span of bytes in memory.</summary>
<returns>The number of bytes read from the <see cref="T:System.Net.Sockets.NetworkStream" />.</returns>
<returns>The number of bytes read from the <see cref="T:System.Net.Sockets.NetworkStream" />, or 0 if the underlying socket was closed.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -1543,7 +1543,7 @@ There is a failure reading from the network.</exception>
<param name="size">The number of bytes to read from the <see cref="T:System.Net.Sockets.NetworkStream" />.</param>
<param name="count">The number of bytes to read from the <see cref="T:System.Net.Sockets.NetworkStream" />.</param>
<summary>Reads data from the <see cref="T:System.Net.Sockets.NetworkStream" /> and stores it to a byte array.</summary>
<returns>The number of bytes read from the <see cref="T:System.Net.Sockets.NetworkStream" />.</returns>
<returns>The number of bytes read from the <see cref="T:System.Net.Sockets.NetworkStream" />, or 0 if the underlying socket was closed.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -1695,7 +1695,7 @@ There is a failure reading from the network.</exception>
<param name="buffer">The buffer to write the data to.</param>
<param name="cancellationToken">The token to monitor for cancellation requests.</param>
<summary>Reads data from the <see cref="T:System.Net.Sockets.NetworkStream" /> and stores it in a byte memory range as an asynchronous operation.</summary>
<returns>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> that represents the asynchronous read operation. The value of its <see cref="P:System.Threading.Tasks.ValueTask`1.Result" /> property contains the total number of bytes read into <paramref name="buffer" />.</returns>
<returns>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> that represents the asynchronous read operation. The value of its <see cref="P:System.Threading.Tasks.ValueTask`1.Result" /> property contains the total number of bytes read into <paramref name="buffer" />, or 0 if the underlying socket was closed.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -1766,7 +1766,7 @@ There is a failure reading from the network.</exception>
<param name="count">The number of bytes to read from the <see cref="T:System.Net.Sockets.NetworkStream" />.</param>
<param name="cancellationToken">The token to monitor for cancellation requests.</param>
<summary>Reads data from the <see cref="T:System.Net.Sockets.NetworkStream" /> and stores it to a specified range of a byte array as an asynchronous operation.</summary>
<returns>A task that represents the asynchronous read operation. The value of its <see cref="P:System.Threading.Tasks.Task`1.Result" /> property contains the total number of bytes read into <paramref name="buffer" />.</returns>
<returns>A task that represents the asynchronous read operation. The value of its <see cref="P:System.Threading.Tasks.Task`1.Result" /> property contains the total number of bytes read into <paramref name="buffer" />, or 0 if the underlying socket was closed.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down