chronoxor / NetCoreServer

Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
https://chronoxor.github.io/NetCoreServer
MIT License
2.76k stars 575 forks source link

The Question about the calculation of TotalMessages in TcpEchoClient.cs #217

Open Slanely opened 2 years ago

Slanely commented 2 years ago

I find the calculation: TotalMessages = TotalBytes / size; The default size is 32B. But it seems the totalMessages is larger than actual. In fact, the size of message each time clients send is much larger than 32B because of the TCP buffer. I doubt it's because of Nagle Algorithm,but after I close it, the size is still larger than 32B。