You can get a significant improvement of TCP performance using the new Dotnet pipeline concept, the idea is to write and read packages at the same time, each with your pipeline, similar to Java's Netty Network Framework. By standard the native dotnet socket does not implement this concept, but we already have libs that help the use of pipelines for sockets, if you don't want to write one manually: https://github.com/mgravell/pipelines.sockets.unofficial
Already on the WebSocket, you can use the AspNetCore itself, just enable the use of WebSocket in it, the implementation of its WebSocket is much more performic than the C# default WebSocket class, because the AspNetCore under the cloth it implements all this Pipeline concept in Kestrel, no wonder AspNetCore is always well positioned in the performance test rankings/stress of Backend when compared to other languages.
C# can be very performic when we talk about network, but not using the basic of socket's standard classes.
You can get a significant improvement of TCP performance using the new Dotnet pipeline concept, the idea is to write and read packages at the same time, each with your pipeline, similar to Java's Netty Network Framework. By standard the native dotnet socket does not implement this concept, but we already have libs that help the use of pipelines for sockets, if you don't want to write one manually: https://github.com/mgravell/pipelines.sockets.unofficial
If you want to see a real example of use, we use the MU Emulator: https://github.com/munique/openmu
Already on the WebSocket, you can use the AspNetCore itself, just enable the use of WebSocket in it, the implementation of its WebSocket is much more performic than the C# default WebSocket class, because the AspNetCore under the cloth it implements all this Pipeline concept in Kestrel, no wonder AspNetCore is always well positioned in the performance test rankings/stress of Backend when compared to other languages.
C# can be very performic when we talk about network, but not using the basic of socket's standard classes.