I covered this in chapter 3 of the guide. The 2.0.x response to invalid message envelopes is weak and hard to debug. I end up putting printfs into the code sometimes... (search for 'silent' in xrep.cpp)
- Pieter On 24 Sep 2010 20:12, "Ilja Golshtein" <[email protected]> wrote: > Brian, > > I think this thread http://lists.zeromq.org/pipermail/zeromq-dev/2010-August/thread.html#5177 > together with User Guide http://zguide.zeromq.org/chapter:all > answer your questions. > > > Basically you have to prepend your message by empty part at XREQ side > if the counterpart socket type is REP. > > 24.09.10, 21:25, "Brian Granger" <[email protected]>: > >> Hi, >> >> This was a big from earlier this summer that I am still seeing. I am >> observing an assert error in line rep.cpp:232 when connecting a REP >> socket to bound XREQ socket. >> >> I guess my first question is this: Is this combination of sockets >> supported? That is, should this work? >> >> Here is a description of when it shows up: >> >> The following is observed on in the 2.0.x series (have not tried the 2.1x) >> >> XREQ server REP client >> =========== ========== >> >> Case 1: >> >> import zmq >> c = zmq.Context() >> s = c.socket(zmq.XREQ) >> s.bind('tcp://127.0.0.1:5555') >> import zmq >> c = zmq.Context() >> s = c.socket(zmq.REP) >> s.connect('tcp://127.0.0.1:5555') >> s.send('asdf') >> s.recv() --> This gives... >> Assertion failed: fetched (rep.cpp:232) >> Abort trap >> >> Case 2: >> >> import zmq >> c = zmq.Context() >> s = c.socket(zmq.XREQ) >> s.bind('tcp://127.0.0.1:5555') >> s.send('asdf') >> import zmq >> c = zmq.Context() >> s = c.socket(zmq.REP) >> s.connect('tcp://127.0.0.1:5555') >> s.recv() --> This gives >> Assertion failed: fetched (rep.cpp:232) >> Abort trap >> >> >> >> Case 3: >> >> import zmq >> c = zmq.Context() >> s = c.socket(zmq.XREQ) >> s.bind('tcp://127.0.0.1:5555') >> import zmq >> c = zmq.Context() >> s = c.socket(zmq.REP) >> s.connect('tcp://127.0.0.1:5555') >> s.recv() # This blocks >> s.send('asdf') ------> Right as s.send('adsf') is called >> Assertion failed: fetched (rep.cpp:232) >> Abort trap >> >> Some important points: >> >> * Does not happen with client is an XREP, server is XREQ. >> * Does not happen with client as REP, server as REQ. >> >> Any help you can provide in debugging this would be greatly appreciated! >> >> Thanks and cheers, >> >> Brian >> >> >> > > -- > Best regards, > Ilja Golshtein. > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
