jchristn / SuperSimpleTcp

Simple wrapper for TCP client and server in C# with SSL support
MIT License
459 stars 95 forks source link

KeepAliveSettings for server are applied in seconds on connecting client instead of ms #181

Closed MarkBreedveld closed 1 year ago

MarkBreedveld commented 1 year ago

Version 3.0.0.6 has corrected issue of millisecond conversion for .NETFramework. But it is missed on the keepalive for a connecting client on the server. As result, when enabling keepalive in dotnet framework. A heartbeat is send every two miliseconds, resulting in many disconnects and a lot of traffic. Fix is made ready as pull request. Just took the code applied enablekeepalive of server and copied it to enablekeepalive(tcpclient tcpclient) as well in the server.

After this fix the wireshark trace, showed nice heartbeat every second instead of heartbeat every milisecond.

jchristn commented 1 year ago

Thank you so much @MarkBreedveld - merged into v3.0.8! Also added you to the README.