Hi Ondra, Afaik you'd need to memcpy the data - from the event struct as it can be free'd from within libzmq in nondeterministic fashion and thus https://github.com/tchap/gozmq-utils/blob/master/parse_socket_event.c#L51-L52won't work. See the test cases in libzmq for an example :
https://github.com/zeromq/libzmq/blob/master/tests/test_monitor.cpp#L55 On Wed, May 22, 2013 at 11:50 AM, Ondrej Kupka <[email protected]> wrote: > Hi, > > I am working on zmq_socket_monitor bindings + some abstractions for Go. I > am almost there, but I am getting very weird results when I run my tests > (one large test for now to be honest). You can see the output at > http://pastebin.com/kqgjLFyt. As you can see, only once out of ten runs > of the tests, event addr is filled in properly. > > I am not sure what is happening, but I am pretty sure that I am getting > this from libzmq (gozmq) and I am not breaking it anywhere in my Go. In any > case, you can check sources at https://github.com/tchap/gozmq-utils, the > C part is at > https://github.com/tchap/gozmq-utils/blob/master/parse_socket_event.c > > If you find any silly mistake of mine, please let me know, otherwise it is > probably a libzmq bug… > > Thanks in advance, > Ondra Kupka > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
