[zeromq-dev] Breaking blocking in a server app
cremes.devlist at mac.com
Wed Jun 30 16:43:02 CEST 2010
On Jun 30, 2010, at 9:23 AM, Derek Developer wrote:
> Is there any way to break the blocking of zmq_recv() without firing up a client and sending a message like "QUIT SERVER"?
No. The only way to deal with this situation right now is to do a non-blocking receive and use zmq_poll to test for message arrival on the socket.
Note that even if you time out the socket, there's no way to change its state in the case of a REQ/REP socket pair. For that case, the entire socket needs to be torn down (this is a known issue).
You don't need to worry about the "socket state" issue for PAIR, XREQ/XREP, SUB and UPSTREAM sockets since they don't enforce any kind of send/recv pattern.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev