With System.IO.Pipelines you can read and parse data from a socket either by:
- Creating a
Pipeand filling it with aPipeWriterTask that directly receives from a socket withSocket.ReceiveAsync()and using anotherPipeReaderTask to parse the data from the pipe.
OR
- Use a
PipeReaderTask directly on theNetworkStreamfrom the socket to parse the data directly from the stream withPipeReader.Create(new NetworkStream(Socket)))
Is one way more performant than the other, or is the performance difference negligible?