On Fri, Jan 16, 2015 at 01:23:56PM -0600, Les Mikesell wrote:
And, without keepalives enabled, you still won't get an error on the write.
No, if the other end is up after a reboot, you'll get an immediate error and socket close.
That's assuming the window isn't full; if it is, you'll have to wait until a zero-window probe.
App level ping-ponging is the way to make sure TCP connections are actually alive. I've never seen a portable system use keepalives for that, due to the >= 2 hour default and the lack of a portable way to configure the time.
There sure are a lot of mutually-conflicting opinions flying in this thread. I learned this stuff by studying how IRC uses application-level ping-pong, and have encountered and used this info repeatedly in the years since.
-- greg