Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!swbatl!pooh_corner!gilstrap From: gilstrap@pooh_corner.sbc.com (Brian R. Gilstrap) Newsgroups: comp.unix.questions Subject: How to determine when a TCP connection has been broken? Keywords: TCP, errors, detection, SunOS 4.1 Message-ID: <1990Dec4.161433.9662@swbatl.sbc.com> Date: 4 Dec 90 16:14:33 GMT Sender: usenet@swbatl.sbc.com (0000-news(0000)) Reply-To: gilstrap@pooh_corner.sbc.com (Brian R. Gilstrap) Organization: Southwestern Bell Lines: 18 A silly question I'm sure, but how does one determine if a socket associated with a TCP stream has been broken by the other end performing a close(2) (or any other reason for that matter)? The man pages are confusing and the network applications tutorial for SunOS 4.1 doesn't address this issue clearly...as far as I can find. Ideally, I'd like to peform some test on the socket, rather than being forced to do a "read" or "write". In other words, I'd like to be able to determine the validity of the socket without being forced to do a read from or write to the socket (the design of my application makes this desirable). I'd very much appreciate any info (e-mail, since this is probably trivial). Brian R. Gilstrap gilstrap@pooh_corner.tri.sbc.com gilstrap@swbatl.sbc.com ...!{texbell,uunet}!swbatl{!pooh_corner}!gilstrap