dotnet / dotnet/dotnet-api-docs

Zero-bytes read not documented on QuicStream

Open
#11,809 7 comments 0 reactions 0 assignees View on GitHub
area-System.Net doc-enhancement untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

### Type of issue

Missing information

### Description

`ReadAsync` operations on `QuicStream` have special semantics for so called zero-byte reads, but this behavior is not documented.

This behavior can also be found in `NetworkStream.ReadAsync`. The behavior of these methods is in this case[ documented in the return value descriptions](https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.networkstream.readasync?view=net-9.0#system-net-sockets-networkstream-readasync(system-memory((system-byte))-system-threading-cancellationtoken)):

> ... If zero bytes are requested, read operations may complete immediately or may not complete until at least one byte is available (but without consuming any data).

### Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.net.quic.quicstream.readasync?view=net-9.0#system-net-quic-quicstream-readasync(system-memory((system-byte))-system-threading-cancellationtoken)

### Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Net.Quic/QuicStream.xml

### Document Version Independent Id

1477526e-889e-2845-22a4-e5f351b7e3b5

### Platform Id

9ef5f718-3f56-4f6c-74e1-39f55d00884a

### Article author

@karelz

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.