zmq_setsockopt - set ØMQ socket options There is an option for timeout... If not set it will wait infinite by default.
Maybe it will help you. On Dec 31, 2016 8:29 AM, "D.A. Vaughn" <[email protected]> wrote: > In the example below taken from Nicholas Piel's ZMQ tutorial, a client > makes connections to socket 5000 and 6000. My question is, suppose there > are two separate servers, one that handles port 5000 messages and one that > handles 6000? > > What happens if the server listening to port 5000 is down? It appears to > me this client below is blocked even though one of its servers is available. > > Regards > > David > > import zmq > context = zmq.Context() > socket = context.socket(zmq.REQ) > socket.connect("tcp://127.0.0.1:5000") > socket.connect("tcp://127.0.0.1:6000") > > for i in range(10): > msg = "msg %s" % i > socket.send(msg) > print "Sending", msg > msg_in = socket.recv() > > _______________________________________________ > zeromq-dev mailing list > [email protected] > https://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
