[zeromq-dev] Binding to TCP port 0

Ian Barber ian.barber at gmail.com
Thu Jan 26 18:14:52 CET 2012


On Thu, Jan 26, 2012 at 2:57 PM, Martin Lucina <martin at lucina.net> wrote:

> zmq_bind(foo, "tcp://XXXX:*");    // "tcp://*:*" if you want INADDR_ANY
> char endpoint [ZMQ_ENDPOINT_MAX];
> zmq_getsockopt(foo, ZMQ_GET_ENDPOINT, endpoint, sizeof endpoint);
>
> => endpoint is filled as "tcp://XXXX:12345".
>
> zmq_bind(foo, "ipc://*");
> char endpoint [ZMQ_ENDPOINT_MAX];
> zmq_getsockopt(foo, ZMQ_GET_ENDPOINT, endpoint, sizeof endpoint);
>
> => endpoint is filled as "ipc:///tmp/Xyz358hfA7".
>

Nice, +1 from me!

Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120126/6036ae3a/attachment.htm>


More information about the zeromq-dev mailing list