[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:30:35 UTC 2010
Andreas Raab wrote:
> 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"
And I guess I should read more carefully, too :-) In any case, timeouts
*are* handled via #timeout: and that makes good sense.
- A.
>
> #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
|