[zeromq-dev] bind vs connect for ZMQ_PUB socket
Chris Wong
chris at chriswongstudio.com
Mon Mar 8 05:29:24 CET 2010
In the documentation of pub/sub multicast example,
http://www.zeromq.org/area:docs-v20#toc13
Both PUB and SUB socket always have zmq_connect call.
In perf/c/local_thr.c and perf/c/remote_thr.c, the SUB socket always call zmq_bind and the PUB socket always call connect.
In the tcp PUB/SUB example in the documentation, PUB socket calls bind while SUB socket calls connect.
It's getting very confusing. :-) Can someone help clarify the semantics behind zmq_bind and zmq_connect? I thought they were close to the socket API, now I'm not so sure.
Thanks
Chris
More information about the zeromq-dev
mailing list