zeromq/libzmq — pull request #625 by ulikoehler (2013-08-17 18:49:38+00:00)
Title: Zmq send const

Currently there's zmq_send which allows the user to easily send data by copying it.
In my application I frequently need to send constant data (e.g. header frames). You can do that using zmq_init_data() with NULL deallocation functions, but this is not as easy-to-use as zmq_send().

I believe sending constant data is a common usecase. My benchmark results show using zero-copy is ~25% faster in my case.

This Pull Request adds zmq_send_const() (+ Unit test). I think it's important to provide a convenience-style function for constant data, especially if you provide one for non-constant data (zmq_send).