[squeak-dev] The Trunk: Network-dtl.240.mcz

Tobias Pape Das.Linux at gmx.de
Thu Apr 23 15:24:06 UTC 2020


> On 23.04.2020, at 16:57, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> 
> On Thu, 23 Apr 2020, Marcel Taeumel wrote:
> 
>> Hi all!
>> I am on Windows 10. This is my output for the usual calls. Maybe it helps:
>> SocketAddressInformation
>> forHost: 'localhost'
>> service: '12345'
>> flags: 0
>> addressFamily: 0
>> socketType: SocketAddressInformation socketTypeStream
>> protocol: SocketAddressInformation protocolTCP.
>> " an OrderedCollection(::1(MOBILUS-TAB-NEW),12345(12345)-inet6-stream-tcp 127.0.0.1(MOBILUS-TAB-NEW),12345(12345)-inet4-stream-tcp)"
>> NetNameResolver addressForName: 'localhost'.
>> " ::1(MOBILUS-TAB-NEW),0(0)"
>> ***
>> Socket >> #connectTo: times out. Basically "WebClient httpGet: 'http://localhost:12345/test/auth'" does not work. ConnectionRefused.
> 
> I suspect that the server only listens on the IPv4 address while, due to its undeterministic nature (it returns the first address no matter how many are there, and the order of the addresses is not defined), #addressForName: gives you the IPv6 address, so the client can't connect to the server.
> 
> Another issue is that listening on IPv6 addresses is not possible (at least on my machine):
> 
> IPv4 works:
> 
> s := Socket newTCP.
> s listenOn: 60000 backlogSize: 8 interface: (NetNameResolver addressForName: '127.0.0.1').
> s "==> a Socket[waitingForConnection]"
> 
> IPv6 does not work. It just fails silently:
> 
> s := Socket newTCP.
> s listenOn: 60000 backlogSize: 8 interface: (NetNameResolver addressForName: '::1').
> s "==> a Socket[destroyed]"

Shouldn't that rather be

infos := SocketAddressInformation
		forHost: '::1' service: '60000'
		flags:		SocketAddressInformation passiveFlag
		addressFamily:	SocketAddressInformation addressFamilyINET6
		socketType:	SocketAddressInformation socketTypeStream
		protocol:	SocketAddressInformation protocolTCP.
listeningSocket := infos first listenWithBacklog: 5.

as in NetNameResolver|testIPv6?
To be frank, yes we need a few more convenience methods :)

best regards
	-Tobias



> 
> 
> Levente
> 
>> Best,
>> Marcel
>> 
>>      Am 23.04.2020 09:42:00 schrieb John Pfersich via Squeak-dev <squeak-dev at lists.squeakfoundation.org>:
>> 
>>      The network resolvers are definitely different in Linux and MacOS, the one in MacOS is less forgiving, or maybe it’s less robust.
>> 
>>      /—————————————————————/For encrypted mail use jgpfersich at protonmail.com - Free account at ProtonMail.comWeb: https://objectnets.net and https://objectnets.org
>> https://datascilv.com https://datascilv.org
>> 
>>      On Apr 22, 2020, at 18:36, David T. Lewis <lewis at mail.msen.com> wrote:
>> 
>>      I have to suspect platform differences at this point. I think that you
>>      are using OS X (is that right?) and I expect that the network resolver
>>      may behave quite differently on different platforms, so we'll need to
>>      collect a few more data points to see where the issues are.




More information about the Squeak-dev mailing list