[zeromq-dev] java server (DEALER) + worker / c client (REQ)

Davis Ford davisford at gmail.com
Thu Sep 27 19:04:34 CEST 2012


Thanks for confirming, Chuck.  So, the reason it works for the
http://zguide.zeromq.org/c:tripping demo code is because it is a DEALER

I suspected this, but I'm still experimenting with the API and learning the
semantics.

The FP exception was dump copy/paste from the example code -- zclock_time()
returns same timestamp for start/end, leads to zero division.

On Thu, Sep 27, 2012 at 12:51 PM, Chuck Remes <lists at chuckremes.com> wrote:

>
> On Sep 27, 2012, at 11:42 AM, Davis Ford wrote:
>
> > One follow up question, if I try to change the semantics so the client
> sends asynchronously, it doesn't seem to work.
> > [snip]
> > When it gets to the async loop, the program outputs:
> >
> > Asynchronous round-trip test...
> > zmq error:    : Unknown error: 156384763
> > zstr_send (line 115) returned errno Unknown error: 156384763
>
> That isn't an unknown error, that is EFSM. You can figure that out by
> looking at the zmq.h and looking at the ZMQ_HAUSNUMERO constant. Do a
> little math and it is equal to EFSM.
>
> The reason you are getting this is because you are not obeying the
> restrictions of a REQ socket. For every send, there must be a matching
> recv. If you send twice in a row (or recv twice in a row) you'll get the
> state machine error.
>
> Please read the man page and guide for more help on REQ sockets and their
> restrictions.
>
> cr
>
>
> _______________________________________________
> 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/20120927/8ddcf334/attachment.html>


More information about the zeromq-dev mailing list