[zeromq-dev] Context delayed creation

Pieter Hintjens ph at imatix.com
Wed Sep 7 09:14:01 CEST 2011


On Wed, Sep 7, 2011 at 1:56 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:

> int zmq_sysctl (int option, void *value, size_t size);

It's a little too clever IMO, but might work. There is no POSIX API to
follow here. The name is surprising, not in a good way. I like using a
single API call, it makes it cheap to extend and can be wrapped as we
do for setsockopt with a higher level API. Also, you'd want getctxopt
for symmetry.

How about zmq_setctxopt()? That is consistent then (we could fix the
init/term calls to match too):

zmq_ctx_t *context = zmq_ctx (int context_type);
int zmq_setctxopt (zmq_ctx_t *context, int option, void *value, size_t size);
int zmq_getctxopt (...)
int zmq_close_ctx (...)

-Pieter



More information about the zeromq-dev mailing list