dotnet / WatsonTcp

WatsonTcp is the easiest way to build TCP-based clients and servers in C#.
MIT License
600 stars 117 forks source link

IdleClientTimeoutSeconds #250

Closed teSill closed 1 year ago

teSill commented 1 year ago

In the summary of the IdleClientTimeoutSecondsproperty, it's stated that the timer resets when a message is received from a client OR a message is sent to the client. On the "Disconnecting Idle Clients" section of the readme, it's said that the timer is only reset when receiving a messages from the client.

How it's put in the readme seems to be the correct current behaviour. Is the summary just incorrect/out of date?

jchristn commented 1 year ago

These values are just a pass through to the underlying TCP implementation. In your case with NETCore 3.1 it's passing these into SetSocketOption. In my experience, the behavior varies across platforms.

https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.setsocketoption?view=net-8.0