Chris Wong wrote: > 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.
Bind and connect make sense only for transports that have asymmetric connecting model, i.e. one peer waits for connection, while the second peer creates the connection. For symmetric and/or connectionless transports - such as PGM - the both functions have exactly the same semantics. Martin _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
