[squeak-dev] Re: Port numbers in network tests

Colin Putney colin at wiresong.com
Thu Apr 4 17:32:24 UTC 2013


On Thu, Apr 4, 2013 at 10:18 AM, Frank Shearar <frank.shearar at gmail.com>wrote:


> OK, so it's not a crazy implementation? It's been a long time since I
> worked with sockets, and pretty much the first time I've worked with
> sockets in Squeak.
>

I think that in practice, I'd just pick a random port (1025 to 65535) and
answer that. Between the 2^15 possible ports and the short time that each
test occupies a port, chances of collision are low, and if one does occur,
well, it's not a catastrophe.

Your "crazy" implementation might end up causing *more* failures, because
the OS sometimes takes a short while to clean up after a socket is closed,
and attempts to listen on the same port will fail until the clean up is
done.

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130404/cbf7ba33/attachment.htm


More information about the Squeak-dev mailing list