Skip to content

System.Net.Sockets.NetworkStream.Read(Byte[], Int32, Int32) #10925

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
algor1 opened this issue Feb 7, 2025 · 4 comments · Fixed by #10983
Closed

System.Net.Sockets.NetworkStream.Read(Byte[], Int32, Int32) #10925

algor1 opened this issue Feb 7, 2025 · 4 comments · Fixed by #10983

Comments

@algor1
Copy link

algor1 commented Feb 7, 2025

Type of issue

Missing information

Description

Hi
Please add info in chapter Read(Byte[], Int32, Int32) of System.Net.Sockets.NetworkStream to Returns row:

Returns
The number of bytes read from the [NetworkStream] , or 0 if the socket is closed

I managed to find this info only in comments in the code but it is really important to know what it returns when socket is closed.

Thanks in advance.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.networkstream.read?view=net-9.0#system-net-sockets-networkstream-read(system-byte()-system-int32-system-int32)

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Net.Sockets/NetworkStream.xml

Document Version Independent Id

b40c2ef4-b8a0-8de3-e71d-baf1aaae541b

Article author

@karelz

@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 7, 2025
@ghost
Copy link

ghost commented Feb 7, 2025

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

1 similar comment
@ghost
Copy link

ghost commented Feb 7, 2025

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Feb 7, 2025
@gewarren gewarren added area-System.Net and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Feb 14, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl

rzikm added a commit that referenced this issue Feb 14, 2025
Fixes #10925.

Mentions that returns 0 when socket was closed.
@antonfirsov
Copy link
Member

@algor1 that code comment is incorrect, see #10960 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants