How to set a zmq socket timeout
I've got client and server applications using zmq in the ZMQ_REQ context. What I'm experiencing is that when the server component goes 开发者_运维百科down or is unavailable, the client will wait until it is available to send its message. Is there a way to set a max wait time or timeout at the client level?
I would guess you can use the zmq_poll(3)
with a timeout greater then zero.
精彩评论