On Mon, Apr 4, 2011 at 6:40 PM, Ian Barber <[email protected]> wrote:
> > > On Mon, Apr 4, 2011 at 5:29 PM, Martin Sustrik <[email protected]> wrote: > >> What about calling it zmq_msg_attach()? >> >> It is kind of explicit about the fact that it attaches the message to >> existing buffer. >> >> Martin >> > > I like attach, it's clear and obvious. Wrap I think is potentially > confusing because of similar terminology around wrapping a message by adding > a message part to the front of it, but I can't see a problem with attach. > > Ian TBH, attach sounds like I could call it multiple times to add several "attachments". It's similar to "add". What about a simple zmq_msg_set_data() or zmq_msg_set_buffer() ? Or just to have one function(zmq_msg_create or zmq_msg_init) with 3 different signatures: zmq_msg_create(zmq_msg_t *msg); // zmq_msg_init(); zmq_msg_create(zmq_msg_t *msg, size_t size); // zmq_msg_init_size(); zmq_msg_create(zmq_msg_t *msg, size_t size, void *data, zmq_free_fn *ffn, void *hint); This way it would be much more clear that those functions are mutually exclusive. Martin
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
