[zeromq-dev] Binding to TCP port 0
Martin Sustrik
sustrik at 250bpm.com
Thu Jan 26 22:28:03 CET 2012
On 26/01/12 15:57, Martin Lucina 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".
Note that out of the two wildcards, only one is resolved in synchronous
way -- the port. The interface is resolved asynchronously when actual
connection is made from the peer.
Martin
More information about the zeromq-dev
mailing list