zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.75k stars 2.36k forks source link

zmq_msg_sets analogous to zmq_msg_gets #1305

Open metadings opened 9 years ago

metadings commented 9 years ago

We've got

int zmq_msg_get (zmq_msg_t *message, int property);
const char *zmq_msg_gets (zmq_msg_t *message, const char *property);

And the respective

int zmq_msg_set (zmq_msg_t *message, int property, int value);

Don't we need also a

int zmq_msg_sets (zmq_msg_t *message, const char *property, const char *value);

or the like...?

hintjens commented 9 years ago

Yes, this is missing to allow arbitrary metadata to be sent to a peer. On Jan 15, 2015 1:20 PM, "Uli Riehm" notifications@github.com wrote:

We've got

int zmq_msg_get (zmq_msg_t message, int property); const char zmq_msg_gets (zmq_msg_t message, const char property);

And the respective

int zmq_msg_set (zmq_msg_t *message, int property, int value);

Don't we need also a

int zmq_msg_sets (zmq_msg_t message, const char property, void *value);

or the like...?

— Reply to this email directly or view it on GitHub https://github.com/zeromq/libzmq/issues/1305.

rodgert commented 9 years ago

I believe socket_base.cpp:798 currently precludes the sending of metadata. This was introduced as a fix for issue #1058 https://github.com/zeromq/libzmq/issues/1058.

On Thu, Jan 15, 2015 at 8:53 AM, Pieter Hintjens notifications@github.com wrote:

Yes, this is missing to allow arbitrary metadata to be sent to a peer. On Jan 15, 2015 1:20 PM, "Uli Riehm" notifications@github.com wrote:

We've got

int zmq_msg_get (zmq_msg_t message, int property); const char zmq_msg_gets (zmq_msg_t message, const char property);

And the respective

int zmq_msg_set (zmq_msg_t *message, int property, int value);

Don't we need also a

int zmq_msg_sets (zmq_msg_t message, const char property, void *value);

or the like...?

— Reply to this email directly or view it on GitHub https://github.com/zeromq/libzmq/issues/1305.

— Reply to this email directly or view it on GitHub https://github.com/zeromq/libzmq/issues/1305#issuecomment-70096470.