
26 Sep
2013
26 Sep
'13
2:20 a.m.
On 9/26/2013 1:00 PM, Quoth Niall Douglas:
Much better to turn on TCP keepalive (it's one of the socket options). Then you'll learn when the transport has gone away.
Yes and no. It's cleaner (invisible at the application layer, so won't confuse your protocol) but you have less control over it (and the defaults usually still take quite a long time to detect a disconnection). So if you're paying for the link itself it might be more expensive. If you're only paying for the application-layer data then it'll be cheaper.