NetCoreServer icon indicating copy to clipboard operation
NetCoreServer copied to clipboard

Is it possible to switch custom Buffer implementation to Pipeline?

Open pedoc opened this issue 3 years ago • 0 comments

hello, thanks for the great work.

While reading your code, I also read the source code of https://github.com/kerryjiang/SuperSocket, there is a major difference in the processing of receiving and sending parts,

  1. In NetCoreServer, a custom Buffer type is used to manage the buffer
  2. In SuperSocket, the Pipeline (https://learn.microsoft.com/en-us/dotnet/standard/io/pipelines) component provided by the standard library is used to read and write Socket

So, I'm curious about the following questions

  1. In the current custom Buffer implementation, if there is a large amount of data received and sent, will it cause GC pressure?
  2. Is it possible to change the custom buffer implementation to use Pipeline? Do you think it will improve the performance?

PS: In addition, if you use Pipeline, it will bring an additional benefit, that is, it will be easier to parse TCP streaming data (with ReadOnlySequence), which can reduce the difficulty of upper-layer application processing.

Thanks again

pedoc avatar Apr 26 '23 02:04 pedoc