This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
How to find out if socket closed?
- From: Grant Edwards <grante at visi dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Fri, 11 Jul 2003 12:44:41 -0500
- Subject: [ECOS] How to find out if socket closed?
I've been browsing around the old network stack code for a
couple hours now trying to figure out a way to determine if a
TCP connection has been closed by the other end.
I can't read data from it because I've got nowhere to put it,
but I need to know if it's closed. I can't write any data to
the socket either. Is there any way to query a socket to find
out if the other end has been closed?
Under Unix, I think I'd get a SIGPIPE when the other end does a
close(), right?
--
Grant Edwards
grante@visi.com
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss