From: timsuth@... (Tim Sutherland) Date: 2001-12-10T16:59:15+09:00 Subject: [ruby-talk:28067] Re: TCPServer In article <20011210.090436.134591281.1860@zip.com.au>, Harry Ohlsen wrote: >> Ernest Ellingson wrote: >> >>> How does one set up a TCPserver with the SO_KEEPALIVE option? > >Just out of interest, can you explain why one would want to set that >option? I've written something based on TCPServer recently, hence I'm >wondering whether it might be useful to me, too! The socket FAQ (http://www.ntua.gr/sock-faq/index.html) explains that this results in a keepalive packet being sent to the peer if no data has been sent or received for ~2 hours. Almost all of the time it's better to add keepalive functionality to the client protocol instead so you don't have to wait two hours to realise the remote end it down. -- SCCS, the source motel! Programs check in and never check out! -- Ken Thompson