[zeromq-dev] Problem with REQ/REP and ZMQ_REQ_RELAXED

Erik Thiele erik.thiele at thiele-hydraulik.de
Fri Jun 2 08:02:48 CEST 2017


hello

attached to this mail are two minimum programs.
i am using debian linux with libzmq3 version 4.0.5.
compile the programs like this:

gcc -Wall -Werror server.c -o server -lzmq
gcc -Wall -Werror client.c -o client -lzmq

now start them both.

output of server process:
receiving first
sending first
receiving second
*** now blocking forever

output of client process:
sending first
sending second
*** now blocking forever

If i do not set the options ZMQ_REQ_RELAXED and ZMQ_REQ_CORRELATE in
the client process, then sending the second time of course fails
because the state machine is in receive mode. But with this option I
would expect it does not block, but instead send the next message which
should then be received in the server. instead the client blocks
forever which I do not understand. What's wrong here?


Erik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client.c
Type: text/x-c++src
Size: 668 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170602/a443a9be/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.c
Type: text/x-c++src
Size: 564 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170602/a443a9be/attachment-0001.c>


More information about the zeromq-dev mailing list