Hello! I'm working on adding support for zmq_proxy_steerable commands to zproxy in czmq. I noticed I was getting an invalid proxy command error when trying to send a "PAUSE" command using zstr_send.
Taking a look at the libzmq proxy.cpp code ~ line 117 on libzmq head ( https://github.com/zeromq/libzmq/blob/master/src/proxy.cpp#L117) , I see: -------------------------------------------------- if (msg.size () == 6 && memcmp (msg.data (), "PAUSE", 6) == 0) state = paused; ---------------------------------------------------- My understanding is that zstr_send (from czmq) does not send the NULL at the end of the string, and zstr_recv adds one ( https://github.com/zeromq/czmq/blob/master/src/zstr.c#L68 ) While I know libzmq is not czmq - I just want to make sure I understand the libzmq code. Should I be sending "PAUSE" with a null terminator, and is that why the command check in proxy.cpp is looking for a message size of 6 rather than 5? Thanks! Brian
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
