dotnet / WatsonTcp

WatsonTcp is the easiest way to build TCP-based clients and servers in C#.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IdleClientTimeoutSeconds

teSill opened this issue · comments

In the summary of the IdleClientTimeoutSeconds property, 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?

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