On Tue, Feb 8, 2011 at 8:41 AM, Gaspard Bucher <[email protected]> wrote:
> Damn ! I found where the problem comes from. Translated in plain C, this is > what does not work: > void *requester = zmq_socket (context, ZMQ_REQ); > zmq_connect(requester, "tcp://localhost:5555"); > zmq_send (requester, &request, 0); > zmq_connect(requester, "tcp://localhost:7777"); > zmq_send (requester, &request2, 0); /// hang, probably trying to send to > 5555 ? Right. This is by design, not a bug: you can connect to multiple endpoints and the REQ socket will load balance your requests between those. If one of the endpoints is not bound, it'll wait. The correct way to use sockets here is to open a new socket (and close the old one) for each new server. You don't gain anything by 'reusing' a socket handle. - Pieter Hintjens iMatix _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
