First, keep-alive mode1. The HTTP protocol uses "request-answer" mode, when using normal mode, that is, non-keepalive mode , each request/reply client and server to create a new connection, immediately after the completion of the connection (the
What is a long connection
HTTP1.1 Specifies that long connections are maintained by default (HTTP persistent connection, also translated as persistent), data transfer is done to keep the TCP connection continuously open (no RST packet, no four
In normal communication, if the send function is successfully sent, the number of bytes of the sent data is returned. If an error occurs, send returns-1, and the global variable errno is set. In many cases, sending returns-1 because the connection
In Linux, the implementation source code of TCP keep alive is analyzed, and keepaliveKeep Alive under TCP
We often say that the TCP keep alive is to ensure the validity of the connection, send a test packet at a certain interval, and confirm
Original address: http://blog.csdn.net/oceanperfect/article/details/510645741. HTTP keep-aliveIn the early days of HTTP, each HTTP request required an TPC socket connection to open, and the TCP connection was disconnected after use once.Using
Keep Alive under TCPWe often say that the TCP keep alive, is to ensure the validity of the connection, at a certain time interval to send a probe packet, based on the reply to confirm that the connection is valid. Typically, upper-level applications
NeedsDetects whether the client program is forced to end without affecting server processing.StatusBoth the server side and the client socket set the KeepAlive property.Server-side set the number of probes and other parameters, the client, the
NeedsDetects whether the client program is forced to end without affecting server processing.StatusBoth the server side and the client socket set the KeepAlive property.Server-side set the number of probes and other parameters, the client, the
[Requirement]Checks whether the client program is forcibly terminated without affecting server processing.[Status quo]The keepalive attribute is set for both the server and client sockets.The server sets parameters such as the number of probes. The
How to Keep Alive SSH SessionsMany NAT firewalls time out idle sessions after a certain period of time to keep their trunks clean. Sometimes the interval between session drops is a hours, but on many commodity firewalls, connections was killed after
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.