Kernel's interface for setting TCP heartbeat SO_KEEPALIVEwww.2cto.com/proc/sys/net/ipv4/tcp_keepalive _ * when TCPlink has no data communication for a long time, in order to prevent silly behaviors (Clientcrash ), you can send some helloTCP packets. There are currently two types...
Kernel's interface for setting TCP heartbeat SO_KEEPALIVE www.2cto.com/proc/sys/net/ipv4/tcp_keepalive _ * when TCP link has no data communication for a long time, to prevent silly behaviors (Client crash), you can send some "hello" TCP packets. There are currently two methods: 1. specify the SO_KEEPALIVE attribute when creating the socket. the kernel sets a timer for periodic processing (the advantage is that the heartbeat will not be lost, and the disadvantage is that the "hello" data cannot be customized. the user program creates a timer in the user process to send the "hello" TCP packet (the advantage is that the "hello" packet can be customized, but when the system load is large, abnormal heartbeat)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service