TCP KeepAlive: Keeps TCP Alive. A timer is set up together with the TCP connection, if the timer reaches zero a probe packet is sent without any data. It has a flag set for ACK. The peer only has to support TCP/IP, not specifically keepalive. If alive it will respond with a zero data packet as well that has the ACK flag set. Because TCP lets your program handle a stream, not packets, a zero length data packet is not dangerous for the program listening on the socket. Two use cases for keepalive: - Detecting dead peers - Prevent disconnects due to inactivity