[zeromq-dev] 0MQ 3.0 - API improvements
Pieter Hintjens
ph at imatix.com
Fri Apr 8 10:22:30 CEST 2011
On Thu, Apr 7, 2011 at 4:22 PM, Daniel Holth <dholth at gmail.com> wrote:
> It would be more intrusive but I would also like a getsockopt/setsockopt per
> option type for bindings.
Incidentally I added this to libzapi yesterday. Because there are a
lot of options each with different types I ended up generating the
whole class.
http://libzapi.zeromq.org/manual:zsockopt
Anyone interested in re-using that code generation layer for another
language, give a shout. The XML model I used is attached. Since all
these types change in 3.0, it'll be particularly neat to be able to
generate both 2.x and 3.x code from one model.
-Pieter
<?xml?>
<!-- Used to generate the socket options interface
-->
<options script = "sockopts">
<option name = "hwm" type = "uint64" mode = "rw" />
<option name = "swap" type = "int64" mode = "rw" />
<option name = "affinity" type = "uint64" mode = "rw" />
<option name = "identity" type = "blob" mode = "rw" />
<option name = "rate" type = "int64" mode = "rw" />
<option name = "recovery_ivl" type = "int64" mode = "rw" />
<option name = "recovery_ivl_msec" type = "int64" mode = "rw" />
<option name = "mcast_loop" type = "int64" mode = "rw" />
<option name = "sndbuf" type = "uint64" mode = "rw" />
<option name = "rcvbuf" type = "uint64" mode = "rw" />
<option name = "linger" type = "int" mode = "rw" />
<option name = "reconnect_ivl" type = "int" mode = "rw" />
<option name = "reconnect_ivl_max" type = "int" mode = "rw" />
<option name = "backlog" type = "int" mode = "rw" />
<option name = "subscribe" type = "blob" mode = "w" />
<option name = "unsubscribe" type = "blob" mode = "w" />
<option name = "type" type = "int" mode = "r" />
<option name = "rcvmore" type = "int64" mode = "r" />
<option name = "fd" type = "int" mode = "r" />
<option name = "events" type = "uint32" mode = "r" />
</options>
More information about the zeromq-dev
mailing list