[squeak-dev] WebClient test fails in trunk

David T. Lewis lewis at mail.msen.com
Tue Jul 17 23:59:41 UTC 2012


On Mon, Jul 16, 2012 at 04:03:44PM +0200, Andreas Raab wrote:
> Hi David -
> 
> The old IPv6 code. Sigh. Unfortunately, this code was written with the idea 
> of being a complete rewrite and not an add-on to the existing library but 
> it's now used as an add-on and this causes all sorts of problems, including 
> major compatibility issues.
> 
> I really do think that code needs serious overhaul. It basically needs to 
> be rewritten such that:
> a) The external interface remains simply a byte array (be that an IPv4 
> style 4-element byte array or some sort of SocketAddress which really *is* 
> a socket address and not some plugin-internal structure combining address, 
> port, family, and the phase of the moon)
> b) SocketAddress[Info] is used privately within the socket and never 
> exposed to a client unless that client specifically asks for it (but 
> definitely not via stuff like Socket>>[local|remote]Address)
> c) NetNameResolver needs to return IPv4 addresses by default and only 
> answer IPv6 if the client specifically requests it.
> 
> Without this you're basically playing whack-a-mole trying to catch bugs 
> that pop up randomly. A straightforward user like WebClient should be able 
> to use Sockets without any change, defaulting to IPv4, and only when it 
> specifically requests IPv6 support should it be exposed to IPv6. Otherwise 
> this will be a complete nightmare.
>

Hi Andreas,

I had overlooked the #stringFromAddress: method in NetNameResolver, which
does the job of converting addresses to strings. This needed an update to
accomodate SocketAddress, which is fixed in trunk now. With that in place,
WebClient can use #stringFromAddress and the patches are trivial. Updated
changes attached.

Dave
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WebClient-networkPatches-dtl.2.cs.gz
Type: application/octet-stream
Size: 1666 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120717/7a3a9064/WebClient-networkPatches-dtl.2.cs.obj


More information about the Squeak-dev mailing list