[squeak-dev] Re: [BUG][FIX][FIX], was: (Re: Re: Flaw in SocketStream>>peek detected)

Andreas Raab andreas.raab at gmx.de
Fri Jan 15 01:29:09 UTC 2010


Igor Stasenko wrote:
> " the above should endup with timeout exception ,
> but following one should hang indefinitely"

Absolutely not. Read the comment on shouldSignal:

	"If shouldSignal is enabled the Socket Exceptions
	ConnectionClosed and ConnectionTimedOut"

#shouldSignal does NOT cover timeouts; timeouts are set separately, via 
#timeout:. If you want peek to wait forever you need to use, e.g.,

| s|
s:= (SocketStream openConnectionToHostNamed:  'google.com' port: 80) .
s timeout: 0. "<- no timeouts please"
s peek.


Cheers,
   - Andreas



More information about the Squeak-dev mailing list