PipeWriter.Advance with prefix discard #32891
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.IO.Pipelines
backlog-cleanup-candidate
An inactive issue that has been marked for automated closure.
no-recent-activity
Milestone
This API would allow PipeWriter to be used efficiently with protocols which use variable-length enveloping. Without this, one must first buffer data elsewhere before writing into a PipeWriter.
The basic idea is to write code that over-allocates a prefix for the envelope:
░░░░|░░░░░░░░
And then writes the data:
░░░░|▓▓▓▓▓░░░
And finally writes the variable-length envelope into the prefix:
░░▓▓|▓▓▓▓▓░░░
And then calls
Advance()
with the number of unused prefix bytes.Or:
The text was updated successfully, but these errors were encountered: