[zeromq-dev] new libzmq API

Pieter Hintjens ph at imatix.com
Fri Jan 18 09:01:23 CET 2013


On Fri, Jan 18, 2013 at 1:16 AM, MinRK <benjaminrk at gmail.com> wrote:

> For instance, what would we do if there ever needs to be a context option
> that isn't an int?

In theory, using macros and a single function makes it easier to write
generic code; in practice since the property types are not consistent,
it's not worth much (and is actually nasty since it hides different
function signatures under a single one).

So I'd probably go with one function pair (get/set) per option, with
explicit arguments and return types, as we do in CZMQ. It's not much
harder to build the API and it's significantly nicer to use.

We started this experiment with the zmq_msg_more() function. This is
what I'd do for context properties that aren't ints.

-Pieter



More information about the zeromq-dev mailing list