Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!ROBOTICS.JPL.NASA.GOV!litwin From: litwin@ROBOTICS.JPL.NASA.GOV (Todd Litwin) Newsgroups: comp.protocols.tcp-ip Subject: Monitoring TCP/IP sockets Message-ID: <9101291553.AA06606@litwin.jpl.nasa.gov.> Date: 29 Jan 91 15:53:17 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 15 I have a program that uses TCP/IP sockets and needs to know quickly, within a second or so, if the physical connection between the two systems is broken. It appears that the operating system is very tolerant of physical disruptions, and won't timeout the connection and formally break it even if the problem lasts several minutes. I'm using setsockopt() to turn on SO_KEEPALIVE, but this doesn't help, either. Is there any way that I can force a socket to disconnect after a second or so of failure to communicate (short of sending my own heartbeats)? I am running under Sun OS 4.0.2, but also will need to move a version of this software to the Silicon Graphics world, and to the VxWorks real-time operating system. Any suggestions would be greatly appreciated. Todd Litwin Jet Propulsion Laboratory (818) 354-5028 litwin@robotics.jpl.nasa.gov