Path: utzoo!attcan!uunet!wotk!root From: root@wotk.UUCP (Superuser) Newsgroups: comp.protocols.tcp-ip Subject: detecting peer close() Keywords: socket tcp close Message-ID: <10@wotk.UUCP> Date: 7 Aug 90 19:15:28 GMT Organization: World-Wide Technology Lines: 19 I have a BSD 4.3 tahoe system and I have the source code. If I have a connected socket connection, how can I tell when the other end has done a close()? As best as I can tell from the source, the bit in so_state represented by SS_ISCONNECTED is toggled off. Since I have source is it fair to just check this bit? Also I am doing non-blocking i/o with read. Would read() return 0 when the other end closes or -1 with errno set? Thanks, Nick Hennenfent Voice 404 475-2725 Computone Products FAX 404 343-9735 1100 Northmeadow Parkway Usenet ...!uunet!wotk!{nickh,root} Suite 150 Roswell, GA 30076