title: Send NULL message in PyZMQ
body: <p>I'm trying to translate the following example HTTP server based on 0MQ written in C seen here:  <a href="http://hintjens.com/blog:42" rel="nofollow">Hintjens' blog</a> into Python.</p>
  
  <pre><code>def test_http_socket():
      ctx = zmq.Context()
      sock = ctx.socket(zmq.ROUTER)
      sock.setsockopt(zmq.ROUTER_RAW, 1)
      sock.bind("tcp://*:8080")
      while True:
          id_bytes = sock.recv()
          print("id=",id_bytes)
          request = sock.recv()
          print("request=",request)
          if b'/close' in request:
              return
          sock.send(id_bytes, zmq.SNDMORE)
          sock.send(b"""HTTP/1.0 200 OK
  Content-Type: text/plain
  
  Hello, world !""")
          sock.send(zmq.NULL)
  </code></pre>
  
  <p>The problem is on the next line, where I try to translate the C expression</p>
  
  <pre><code>zmq_send (router, NULL, 0, 0);
  </code></pre>
  
  <p>In Python I have the following stack trace:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;pyshell#96&gt;", line 1, in &lt;module&gt;
      test_http_socket()
    File "&lt;pyshell#95&gt;", line 18, in test_http_socket
      sock.send(zmq.NULL)
    File "socket.pyx", line 565, in zmq.backend.cython.socket.Socket.send     (zmq\backend\cython\socket.c:5104)
    File "socket.pyx", line 612, in zmq.backend.cython.socket.Socket.send (zmq\backend\cython\socket.c:4868)
    File "socket.pyx", line 168, in zmq.backend.cython.socket._send_copy (zmq\backend\cython\socket.c:1914)
    File "buffers.pxd", line 200, in buffers.asbuffer_r (zmq\backend\cython\socket.c:6833)
    File "buffers.pxd", line 151, in buffers.asbuffer (zmq\backend\cython\socket.c:6270)
  TypeError: 0 does not provide a buffer interface.
  </code></pre>
  
  <p>In fact, sock.send can only be used to send buffers or messages.
  Is there a way to use 0MQ's zmq_send in another manner from Python, to send a NULL frame ?</p>
  
  <p>By the way, a comment in <a href="https://gist.github.com/hintjens/5480625" rel="nofollow">Github entry</a> shows that it may not close the connection to the client even in C.
  How can I ask the remote client to close its connection (in Python) ?</p>
  
  <p>I'm using libzmq 4.0.1 and PyZMQ 14.0.1 over Python 3.3.2 on Windows 32bits.</p>