Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
What kind of server/client are you using? – Can Kavaklıoğlu Dec 23 '11 at 12:19
I would think it would be the side that initiated the connection. – joeqwerty Dec 23 '11 at 15:10
windows 7 and linux 2.6.x – Dog eat cat world Dec 25 '11 at 2:56
up vote 2 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.