[zeromq-dev] Help on REQ to ROUTER

Rodrigo Farnham rfarnham at gmail.com
Sat Jun 20 01:25:36 CEST 2020

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.brichese at 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 at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20200619/4a8ffd72/attachment.htm>

More information about the zeromq-dev mailing list