On Sun, Jun 19, 2011 at 8:04 AM, Emmanuel Lecharny <[email protected]> wrote:
> wouldn't it be more efficient to use new ServerSocket(0).getLocalport() to
> find a random available port ?

Yes, if any port would be okay. But in most cases, user configure a
tight range (or even multiple ranges) that are allowed. If the user
sets this range to 0, then the above will happen.

/niklas

Reply via email to