<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 4, 2013 at 10:18 AM, Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>&gt;</span> wrote:<br>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><span class="Apple-style-span" style="color:rgb(34,34,34)">OK, so it&#39;s not a crazy implementation? It&#39;s been a long time since I</span><br>
</div>
worked with sockets, and pretty much the first time I&#39;ve worked with<br>
sockets in Squeak.<br></blockquote><div><br></div><div>I think that in practice, I&#39;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&#39;s not a catastrophe.</div>
<div><br></div><div>Your &quot;crazy&quot; 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.</div>
<div><br></div><div>Colin</div></div></div></div>