4 ms·
No but TCP sends keep-alive packets or something in the kernel right? If you can't send anything by the timeout then the connections should drop?
by mehrdadn 8y ago
No but TCP sends keep-alive packets or something in the kernel right? If you can't send anything by the timeout then the connections should drop?
- shereadsthenews 8y agoVanilla TCP does not do this. Sockets remain established forever in the absence of traffic.
- xorcist 8y agoThis is a core feature in TCP/IP. Only the endpoints actually involved in the connection care about what a "connection" really is. If they share a connection, it should be nobody else's business that they do.
- mehrdadn 8y agoThis is definitely not true in this world which is filled with NATs everywhere. The intermediate routers very much care and must care about what connections exist.
- tlb 8y agoOnly if you set the keepalive option, such as: int yes = 1; setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes)); Most servers (Xserver, imapd, sshd) set it.