Streams, Pipes and gRPC
12/29/2022
.NET 7 introduces new methods for Stream type: ReadExactly(...), ReadAtLeast(...) and their async counterparts allow the developers to await 'enough' data to be present for further processing input streams.
At the time of writing this post .NET 7 is still in preview bits. Which means there is still a chance that these methods will not be released.
Why do we have it?
At first these methods may seem a surplus, as developers have been using streams for many years, so why would we need them? There are several workloads in software stack that fits perfectly with this concept. Or rather say payloads instead of workloads.