Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!portc02.blue.aol.com!howland.erols.net!blackbush.xlink.net!ins.net!heeg.de!hmm
From: hmm@heeg.de (Hans-Martin Mosner)
Subject: Re: VW/Sockets (detecting abnormally closed socket)
Message-ID: <E126Fy.J80@heeg.de>
Sender: uucp@heeg.de
Organization: Georg Heeg Objektorientierte Systeme, Dortmund, FRG
X-Newsreader: TIN [version 1.2 PL2]
References: <328F72AB.4E23@compuserve.com>
Date: Mon, 18 Nov 1996 09:02:21 GMT
Lines: 30

Ralph LaChance (71552.2772@compuserve.com) wrote:
: hi,

: I'm struggling w/ a problem in VW where aStream readWait 
: (where the stream is a socket connection) does not appear 
: to detect that the socket it is waiting on has gone away - 
: for when the connected peer terinates unexpectedly. 
[...]
: If I poke the code so that it falls thru readWait as though data
: was available, the primitive read routine 
: (primReadInto:... I think) does detect the ECONNRESET error, but
: apparently both readWait and writeWait do not.

: Has anyone encountered this and worked out a reasonable solution?

You don't mention on which platform you're working. Windows socket
implementations are known for notorious misbehavior...
Even some UNIX socket implementations think that doing more than
the basic open/close/read/write stuff is not necessary...

You might want to play around with the so_keepalive option; but
probably PPD tech support has already proposed that.

Hans-Martin

--
+--- Hans-Martin Mosner ---- Senior Smalltalk Guru :-) ---+
| These opinions are entirely ficticious.  Any similarity |
| to real opinions is purely coincidental and unintended. |
+--- <hmm@heeg.de> ------ URL:http://www.heeg.de/~hmm/ ---+
