yes I get the same behavior in 1.1, 1.0 and in latest squeak trunk. I tried to ping www.google.com or its ip. Network code is probably the same since Squeak3.9. in 1.0 mike rueger started to fix it. Then we had to rollback parts of the change because of IVP6 problems In 1.1 we have the version mike did and we should improve it. We are waited from feedback to see if we will do the same rollback as in 1.0. Stef On May 16, 2010, at 8:17 PM, Ron Jeffries wrote:
Hello, RickT. On Sunday, May 16, 2010, at 1:14:14 PM, you wrote:
Does the Socket>>ping: work for you? Or am I the only one breaking on this?
I am seeing a failure similar to the one that you are when pinging localhost or my own web site from Pharao, or the example in the Socket class>>ping: method. I see this in Windows XP and .. hold on ... Windows 7.
If I do Socket ping: 'localhost' I get a popup about "Continue to wait for connection to localhost". When I finally say Yes to this, it returns Socket class, as shown in the method:
Socket class>>ping: hostName "Ping the given host. Useful for checking network connectivity. The host must be running a TCP echo server." "Socket ping: 'squeak.cs.uiuc.edu'"
| tcpPort sock serverAddr startTime echoTime | tcpPort := 7. "7 = echo port, 13 = time port, 19 = character generator port"
serverAddr := NetNameResolver addressForName: hostName timeout: 10. serverAddr = nil ifTrue: [ ^ self inform: 'Could not find an address for ', hostName].
sock := Socket new. sock connectNonBlockingTo: serverAddr port: tcpPort. [sock waitForConnectionFor: 10] on: ConnectionTimedOut do: [:ex | (self confirm: 'Continue to wait for connection to ', hostName, '?') ifTrue: [ex retry] ifFalse: [ sock destroy. ^ self]].
sock sendData: 'echo!'. startTime := Time millisecondClockValue. [sock waitForDataFor: 15] on: ConnectionTimedOut do: [:ex | (self confirm: 'Packet sent but no echo yet; keep waiting?') ifTrue: [ex retry]]. echoTime := Time millisecondClockValue - startTime.
sock destroy. self inform: hostName, ' responded in ', echoTime printString, ' milliseconds'.
There is no class variable in NetNameResolver named UseOldNetwork.
I am using Pharo-1.0 Latest update: #10517
Thanks,
Ron Jeffries www.XProgramming.com www.xprogramming.com/blog Knowledge must come through action; you can have no test which is not fanciful, save by trial. -- Sophocles
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users