[zeromq-dev] binding to all interfaces

Steve Murphy murf at parsetree.com
Fri Aug 1 18:01:16 CEST 2014


I've been playing around with the
bind calls, and I discover that I can't
use the '*' to bind to all interfaces, as
the documentation suggests.

I'm on linux, centos 6.5, and on ubuntu 14.04, czmq 2.2.0 and zeromq-4.0.4,
this seems to have been the case for several older versions...

Is this some OS dependent sort of thing?

zctx_t *ctx = zctx_new();
void *sport = zsocket_new(ctx, ZMQ_REP);
int pnum = zsocket_bind(sport, "tcp://

gives me a pnum of -1

So do these:
int pnum = zsocket_bind(sport, "tcp://",

int pnum = zsocket_bind(sport, "tcp:/// :%d",

(for that last one, see the example usage on api.zeromq.org/3-2:zmq-tcp;
that page may need debugging)

but this works:

int pnum = zsocket_bind(sport, "tcp://

So, what am I not understanding?



Steve Murphy
ParseTree Corporation
57 Lane 17
Cody, WY 82414
✉  murf at parsetree dot com
☎ 307-899-5535
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140801/2323e4f0/attachment.html>

More information about the zeromq-dev mailing list