3 ms·
Author here. I'd like to clarify that my use case involves talking to devices inside a factory (i.e. LAN) that are expected to be physically connected/disconnec
by felixge 12y ago
Author here. I'd like to clarify that my use case involves talking to devices inside a factory (i.e. LAN) that are expected to be physically connected/disconnected on occasion. The devices are speaking a text protocol, and my goal was to expose a console UI for occasional manual debugging of those devices. I consider it to be good UX to detect network issues persisting for more than a certain duration, but unfortunately the text protocol does not support heartbeats. So given those constraints, TCP keepalive seemed appropriate, especially since dropping a connection a little to eagerly is not an issue here.
Edit: I'm saying this to clarify that I'm not recommending TCP keepalive for most scenarios.