diff options
Diffstat (limited to 'What is TCP KeepAlive.md')
-rw-r--r-- | What is TCP KeepAlive.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/What is TCP KeepAlive.md b/What is TCP KeepAlive.md new file mode 100644 index 0000000..6b25179 --- /dev/null +++ b/What is TCP KeepAlive.md @@ -0,0 +1,9 @@ +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
\ No newline at end of file |