[zeromq-dev] [PATCH] Moved tests off 5555 (conflict with Eclipse)
Andrew Hume
andrew at research.att.com
Wed May 4 16:21:34 CEST 2011
i hate these looking for random ports programs!
the problem is that i have a program that uses a port that i have carefully chosen
but occasionally is left open for a minute (while i wait
for linux to clear things up) and some bastard program sneaks in and uses it.
the least you can do is pick a port in teh recommended range for this
(isn't it roughly 48K-63K?)
On May 4, 2011, at 7:16 AM, Pieter Hintjens wrote:
> On Wed, May 4, 2011 at 4:03 PM, Martin Lucina <mato at kotelna.sk> wrote:
>
>> On the other hand, if the idiom is supported by libzmq then it can pass
>> a port of 0 directly to bind(2), which results in the OS allocating you a
>> free port. However, this requires a getsockname() API of some kind to get
>> the allocated port number.
>
> Very true. You could get the port number via a getsockopt, no?
>
> Having this in libzmq would be ideal. But I doubt it'll ever get into
> 2.x, and at least a start would be to have a common abstraction for
> language bindings. We can always implement that "natively" afterwards.
>
> IMO looking for a random free port above 10K would work well and not be fragile.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
------------------
Andrew Hume (best -> Telework) +1 623-551-2845
andrew at research.att.com (Work) +1 973-236-2014
AT&T Labs - Research; member of USENIX and LOPSA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110504/d21e8c24/attachment.htm>
More information about the zeromq-dev
mailing list