alecthomas/gozmq — pull request #77 by tchap (2013-05-19 23:28:05+00:00)
Title: Add basic support for zmq_socket_monitor

Hi,

Following the small discussion with @jtacoma at #75, I was thinking that we could start implementing zmq_socket_monitor, or at least discuss how to do it.

The API call itself is pretty simple and is already present in the pull request (no tests for now). Now the question is how to work with this whole monitor thing further. I discovered that in fact there are 2 distinct version of the `zmq_event_t` (i.e. 2 versions of the monitor API). The old (deprecated as of now I think) version is still in the [zeromq3-x](https://github.com/zeromq/zeromq3-x/blob/master/include/zmq.h#L293) repository while the new one is in [libzmq](https://github.com/zeromq/libzmq/blob/master/include/zmq.h#L322) itself. Now the question is what we want to support. Can we drop zeromq3-x?

Anyway, I think that the new API would be much easier to support, because then you can use gozmq Recv to receive events, which is not that simple with the old API since you are passing C structs around. So I guess that would require a special call for receiving events in that case...

What do you think?