It works!! Finally, I was also playing with ZMQ_ROUTER_MANDATORY and could see no issues, damn, such a silly mistake!
Thank you! On Fri, Jun 19, 2020 at 4:30 PM Rodrigo Farnham <rfarn...@gmail.com> wrote: > I found in documentation that ROUTER <-> REQ/REP requires a null > delimiter, which I believe > zmq_send(backend, "", 1, ZMQ_SNDMORE); tries to add, but shouldn't it be > zmq_send(backend, "", 0, ZMQ_SNDMORE); (I also think zmq_send(backend, > NULL, 0, ZMQ_SNDMORE); works) > > I've run into a similar problem before and even setting ZMQ_ROUTER_MANDATORY > does not give an error in the ROUTER side. > > On Fri, Jun 19, 2020 at 3:57 PM Matteo <matteo.brich...@gmail.com> wrote: > >> Hi all, >> >> I have been banging my head on this issue since a couple of days, I >> thought I had enough experience in zmq to make it work but apparently not. >> >> I am rewriting the Simple Pirate Pattern using the pure zmq library and >> Qt. I have used Zmq+Qt before, I can receive a message from REQ to a ROUTER >> no problem, the main issue is responding to a REQ. >> >> zmq_send(backend, destination.data(), static_cast<size_t>( destination >> .size()), ZMQ_SNDMORE); >> zmq_send(backend, "", 1, ZMQ_SNDMORE); >> zmq_send(backend, message.data(), static_cast<size_t>(message.size()), 0); >> >> destination.data() returns a char* to the address of the REQ socket. >> >> I have tried multiple combinations but nothing seems to work so far. >> >> Any suggestions? >> >> Thank you >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev@lists.zeromq.org >> https://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > _______________________________________________ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > https://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org https://lists.zeromq.org/mailman/listinfo/zeromq-dev