Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!DSYS.ICST.NBS.GOV!rbj From: rbj@DSYS.ICST.NBS.GOV (Root Boy Jim) Newsgroups: comp.windows.x Subject: Why does X not use SO_KEEPALIVE? Message-ID: <8905252135.AA05839@dsys.icst.nbs.gov> Date: 25 May 89 21:35:08 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: National Institute of Standards and Technology formerly National Bureau of Standards Lines: 36 ? From: rws@expo.lcs.mit.edu ? This implies that there needs to ? be an option to the X stream-creation routine to specify this. ? At present, there appears to be enough contention about use of keepalives ? that I would prefer to "ignore" them at the Xlib level entirely. Clients ? that wish to (ab)use SO_KEEPALIVE and other OS "features" can use the ? XConnectionNumber() directly. RWS, I saw your query on the TCP/IP list. There seemed to be several heavyweights aligned against keep-alives, and I don't really know enuf to oppose them. However, I do have several comments. 1) As to the objection that KA's would interact poorly with long-haul networks, I agree. However, quite a few X clients talk to a server on the same network, and many of these talk to the same machine (note: I am hereby cautioning people against using UNIX domain sockets, i.e. unix:0, until they work perfectly. Use "localhost:0" or "`$hostname`:0" instead). In this case, KA's might be appropriate. 2) In the case of an xclock that is producing frequent output (especially with a second hand), are KA's sent anyway? My SunOS 3.5 says the KA timer value is 45 seconds. Pretty long time. 3) Several people have mentioned that this feature might be nice on xterms. Perhaps a "-keepalive" option could be added either to xterm or as a standard option. At least then everyone can do it the same way. 4) I am not sure that Barmar's idea of mapping KA failure into an X event helps. Doesn't the OS kill the connection? Or is that left up to the guy who receives the SIGPIPE? Root Boy Jim is what I am Are you what you are or what?