I'm trying to find out how exactly keep-alive works in .NET but link from here doesn't work. Could anybody post a link with specification?
What I'm looking for:
I would like to know how often are the keep-alive packets sent.
Do I have to set KeepAlive via command:
s.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true);
only at the server side or even the client has to set this flag?
Not sure this is what you are looking for, but the SocketOptionName
enum has a KeepAlive
member, as can be seen here.
From the documentation, you would use it this way:
s.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true);