From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,d2a984339d3a364 X-Google-Attributes: gidfee84,public From: cmdavis@ix.netcom.com(Chris Davis ) Subject: Need help with AF_INET, SOCK_STREAM sockets Date: 1995/12/11 Message-ID: <4aftms$l22@ixnews6.ix.netcom.com>#1/1 X-Deja-AN: 121589958 references: <4a9pbq$uss@kernighan.cs.umass.edu> <4ab488$lv@vixen.cso.uiuc.edu> organization: Netcom x-netcom-date: Sun Dec 10 4:23:56 PM PST 1995 newsgroups: comp.unix.osf.osf1 I'm having problems with sockets. Specifically, Internet stream sockets ( AF_INET, SOCK_STREAM variety). My problem is that I cannot seem to be able to get the SO_KEEPALIVE option to work. If you do a "man" on setsockopt, you will notice that DEC claims an application will get SIGPIPE if the connection is broken. This is not the case under v2.0 of the O/S. I even tried the SO_ERROR option of setsockopt() and interrogated the so_error field that it returns. No error such as ETIMEDOUT was ever returned. My application always gets SIGPIPE if I write() to the socket after the remote reader has died, but I desperately need a way to determine that the remote reader no longer has his socket connected WITHOUT doing a write(). Thanks! Chris Davis cmdavis@ix.netcom.com