Dear all, I'm using Pharo1.0rc1 Latest update: #10493, on Windows Vista , runtime 3.11.4.
Following test is going fine: SocketTest>>testConnectToLocalhostThroughNetNameResolverAddressForNameLocalhost |serverSocket clientSocket address| serverSocket := Socket newTCP. clientSocket := Socket newTCP. [ serverSocket listenOn: 6665. address := NetNameResolver addressForName: '127.0.0.1' timeout: 20. clientSocket connectTo: address port: 6665] ensure: [ clientSocket close. serverSocket close. ] (connect to a socket on localhost) however, following test: testConnectToLocalhostThroughNetNameResolverLocalHostAddress |serverSocket clientSocket address| serverSocket := Socket newTCP. clientSocket := Socket newTCP. [ serverSocket listenOn: 6665. address := NetNameResolver localHostAddress. clientSocket connectTo: address port: 6665] ensure: [ clientSocket close. serverSocket close. ] is failing with following error: ConnectionTimedOut: Cannot connect to: fe80::6dd3:7860:93c9:46a0%10(PC_xxx),6665(6665) [] in Socket>>connectTo:waitForConnectionFor: Socket>>waitForConnectionFor:ifTimedOut: Socket>>connectTo:waitForConnectionFor: Socket>>connectTo: Socket>>connectTo:port: [] in SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress BlockClosure>>ensure: SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress SocketTest(TestCase)>>performTest [] in [] in SocketTest(TestCase)>>runCase BlockClosure>>ensure: I understand that the above address is an ipv6 address. (the NetNameResolver localHostAddress lookup returns on my machine a ipv6 address) If i do ipconfig on my machine: Ethernet-adapter LAN-verbinding: Verbindingsspec. DNS-achtervoegsel: lan Link-local IPv6-adres . . . . . . : fe80::6dd3:7860:93c9:46a0%10 IPv4-adres. . . . . . . . . . . . : 10.0.0.39 Subnetmasker. . . . . . . . . . . : 255.255.255.0 Standaardgateway. . . . . . . . . : 10.0.0.138 its the same ipv6 address. Is it normal that the Socket class can not handle ipv6 addresses ? I get a timeoutexception on it (however this happens immediately). Is this the behaviour that i can expect ? The reason i noticed this is that I'm trying Magma, the server in a separate image but on the same machine, under ubuntu 9.10 everything worked fine, under Windows Vista it crashed, since internally it also uses NetNameResolver localHostAddress to connect to 'localhost', and i got the same connect timeout exception. In attachment, a fileout of the SocketTest (had to create a new testclass for this :-( ) Kind regards, Bart -- imagination is more important than knowledge - Albert Einstein Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein The true sign of intelligence is not knowledge but imagination. - Albert Einstein Gravitation is not responsible for people falling in love. - Albert Einstein
SocketTest.st
Description: Binary data
_______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
