help with Socket>>isOtherEndConnected, please

Michael Fremont mike at zorch.com
Wed Sep 19 22:35:49 UTC 2001


Hi all,

I'm a squeak newbie esp. wrt sockets.  I have a telnet connection open to 
squeak 
(and run this code:

(Delay forSeconds:10) wait.
socket isOtherEndConnected
	ifTrue: socket sendData: 'hi there'.

This works, including if I close the other end before I get to this code (no 
send is 
attempted).

But the following code gets a debug message, 'send data timeout; data not 
sent' when 
I close the other end well before the test:

10 timesRepeat:
	[
	(Delay forSeconds:10)wait.	
	socket isOtherEndConnected
		ifTrue: socket sendData: 'hi there'.
	]

I'm going bonkers trying to figure this out.  With tests of various 
permutations the 
failure seems to happen anytime the test is inside a block.  Any ideas?

Thanks in advance,

Mike




More information about the Squeak-dev mailing list