Quote:> I'm writing an application in OS/2 that needs to check whether a
> socket connection it is using is still alive. In Stephens the option
> SO_KEEPALIVE is discussed, but there is no mention of how to set the
> amount of time before TCP/IP sends a packet to see if the other end
> _really_ is alive. (The other end is a 55L RS/6000)
Most implementations do not give you per-socket control over the
keepalive parameters, but system-wide control. Also, while the use
of this socket option is trivial, there are many subtle implications
(such as the possibility of dropping a perfectly good connection).
I suggest you read Chapter 23 of my recent "TCP/IP Illustrated"
(Addison-Wesley, 1994). It's an entire chapter on what this option
does, and Appendix E gives the way to change the parameters on some
popular Unix systems.
Rich Stevens