title: Send not blocking on zmq push with high water mark
body: <p>I don't see my ZeroMQ PUSH/PULL socket pair behaving as documented (<a href="http://api.zeromq.org/3-2:zmq-socket" rel="nofollow">here</a> and <a href="http://api.zeromq.org/3-2:zmq-setsockopt" rel="nofollow">here</a>):</p>
  
  <blockquote>
    <p>When a ZMQ_PUSH socket enters the mute state due to having reached the high water mark for all downstream nodes, or if there are no downstream nodes at all, then any zmq_send(3) operations on the socket shall block until the mute state ends or at least one downstream node becomes available for sending; messages are not discarded.</p>
  </blockquote>
  
  <p>The Java example below shows a scenario where I expect the second call to <code>send</code> to block, since I've set the send HWM to 1, I've already sent one message and no message has been received on the PULL socket. What I'm seeing is that the send completes, returning true (indicating <a href="http://zeromq.github.io/jzmq/javadocs/" rel="nofollow">the send was successful</a>).</p>
  
  <p>The idea is to apply back pressure to the data flowing through this PUSH/PULL pair. The send calls on the push side should block the thread if it's outpacing the PULL side. <em>Can someone suggest how I can achieve this?</em></p>
  
  <p>I built jzmq from the HEAD of the master branch and am running against version 3.2.4 of zmq installed from brew on a Mac (I saw the same behaviour against zmq version 4.0.5_2 also installed with brew, with jzmq built from the same source).</p>
  
  <pre><code>import org.zeromq.ZMQ;
  
  public class Main {
  
      public static void main(String[] args) {
  
          ZMQ.Context context = ZMQ.context(1);
  
          ZMQ.Socket pullSocket = context.socket(ZMQ.PULL);
          pullSocket.setRcvHWM(1);
          pullSocket.bind("tcp://*:9944");
  
          ZMQ.Socket pushSocket = context.socket(ZMQ.PUSH);
          pushSocket.setSndHWM(1);
          pushSocket.connect("tcp://localhost:9944");
  
          boolean pushResult = pushSocket.send("a");
          // Expecting this call to block, but it delivers the message:
          pushResult = pushSocket.send("b");
  
          String message = new String(pullSocket.recv());
          message = new String(pullSocket.recv());
          // This third call does block, since only two message were pushed:
          message = new String(pullSocket.recv());
  
      }
  }
  </code></pre>