4

When a connection have not received packets for a certain period of time (default 2 hours), it should send KEEP-ALIVE packets.

My question is, who will start sending KEEP-Alive packets, the client, server or both?

1 Answers1

5

Either side will, assuming:

  1. the OS is configured to do so (linux, windows)
  2. the application configured the socket with SO_KEEPALIVE via setsockopt() (linux, windows).

If both sides have identical keepalive settings, then you'll see them both kick off a keepalive at nearly the same time.

Steve Kehlet
  • 1,105
  • 1
  • 10
  • 16