[zeromq-dev] Req/Rep Timeout?
Andrew Hume
andrew at humeweb.com
Wed May 6 14:41:00 CEST 2015
this is part of what makes zeromq great
(not having to have the receiver be there before the sender sends).
the connect is inherently asynchronous, and therefore
hanging is the correct thing to do.
if you’d like suggestions on how to do this another way,
you’d need to give us more context.
> On May 6, 2015, at 3:35 AM, Bachmair Florian - flexSolution GmbH <florian.bachmair at flexsolution.eu> wrote:
>
> Hi
>
> void *req = zsocket_new(context, ZMQ_REQ);
> int rc = zsocket_connect(req, "%s", addr);
> assert(rc==0);
> s_sendmore(req, ts);
> s_sendmore(req, f);
> s_sendmore(req, cmd);
> s_send(req, msg);
>
> char* reply = s_recv(req); //hangs if REPLYER is not available
>
>
> how can I solve this? My application sends an REQUEST but if the REPLYER is not available, it waits for an reply. Is there a oppurtunity to detect if zsocket_connect fails?
>
> Thanks
> Florian
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150506/5479b782/attachment.htm>
More information about the zeromq-dev
mailing list