[zeromq-dev] Changes to the monitoring message structure

guido dropbox at a-nugget.de
Fri Mar 8 12:33:34 CET 2013


Just recently I found the zmq_socket_monitor function and went "Hoorray!".
Already submitted a patch to simplify the zmq_event_t struct.

And while thinking on how to get that feature into the python bindings I
discovered that using pointers in messages is far from beeing the best
solution for language bindings.

I'd like to change the message structure in that a way that makes the
the integeration into other languages a lot easier.

Namely I'll introduce a second message frame for the variable length
address (endpoint) part.

In addition I'll make the binary parts fit to well known sizes.

The event mask will be a 16-bit value and the error/fd/etc. thingy
a 4 byte value.

I'll make sure that there is no padding, so the values can be parsed

The new message structure will be the following:

Frame 0
  2-byte event id in native byte order
  4-byte event value in native byte order
Frame 1
  variable length string containing the affected endpoint

This change will also eliminate the need for the zmq_free_event
callback, further simplifying the whole thing.

Pull-Request will arrive today for public inspection :)


Just in case someone misses the point:
Please comment!

More information about the zeromq-dev mailing list