sans-io pattern in .NET library
I'm a big fan of writing sans-io implementations https://sans-io.readthedocs.io/ of various protocols which help focus on the actual protocol details while leaving the IO questions to other libraries that implement the code. I am curious what some people might recommend for dealing with the message buffer, that is bytes that are produced to be written to the target and bytes that should be read from the target. I am interested in efficient ways to provide this buffer without producing unnecessary copies and ensure it doesn't slow things down. I was thinking that System.IO.Pipelines would be good for this but curious if there are potentially other options.