NetCoreServer
NetCoreServer copied to clipboard
Is it possible to switch custom Buffer implementation to Pipeline?
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,
- In NetCoreServer, a custom Buffer type is used to manage the buffer
- 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
- In the current custom Buffer implementation, if there is a large amount of data received and sent, will it cause GC pressure?
- 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