title: Socket keepalive not working
body: <p>I have a client connect() to a server, and when idle, it times out after a couple hours.
  I added 
  setsockopt(socket, SOL_SOCKET, SO_KEEPALIVE...) with 1 sec
  but it didnt make a difference.
  Any clues on why keepalive wouldnt work? 
  Would it make a difference if I used SOL_TCP instead of SOL_SOCKET?
  This is on Linux.</p>