[zeromq-dev] Extending zmq_msg_t API

Pieter Hintjens ph at imatix.com
Thu Jul 10 00:25:48 CEST 2014

On Thu, Jul 10, 2014 at 12:00 AM, Thomas Rodgers <rodgert at twrodgers.com> wrote:

> Any opinion on a corresponding zmq_msg_set() constant where a value of 0,
> forces (only) a shared message to be deep copied "under the hood" and clears
> the shared flag bit?  It is not strictly necessary for my purposes, any
> other value than zero is nonsense.

Doesn't look nice IMO. If you actually need to solve this problem, an
explicit method like zmq_msg_deref() would be cleaner. However since
it's not solving a real problem, you shouldn't make it.

> Not to cross the streams too much, but digging through msg.cpp it seems
> there a few cases with message accessors which return EINVAL that also to
> fall into the same category of incorrect usage that you recently added
> "militant" asserts for in socket options.

Yes, that's nice.


More information about the zeromq-dev mailing list