I've attached a test case that shows the high-water mark being ignored on an inproc connection. The test program should block forever, since it sets an HWM of 2 on the PUSH socket, and then tries to send 3 messages. Instead, all 3 messages go through, and the test case runs to completion.
hwm.c
Description: Binary data
It looks like the problem is in how the underlying pipes are created for inproc connections. The pipes aren't created until the zmq_connect call, and it uses the options from the connecting socket for both pipes. If you change the test case so that it calls setsockopt on the "in" socket (even though it's a PULL, and should therefore ignore its HWM), it blocks correctly. I think zmq_connect should use the binding socket's options for the inbound pipe. I've attached a patch that does this. With this patch applied, the test cases blocks like it should.
0001-Correct-HWM-and-SWAP-for-bind-side-of-inproc-connect.patch
Description: Binary data
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
