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