Hi guys,
I'm a bit confused with examples in Code Connected book.
In the book when it want to send an empty message as delimiter frame it uses:
zmq_send(socket, "", 0, 0);
This is not an empty message. it has body the length is just zero. I thought an
empty message is:
zmq_msg_t msg;
zmq_msg_init(&msg);
zmq_msg_send(&msg, socket, 0);
So what is exactly an empty message?
Second question is about ZMQ_SUBSCRIBE. The book uses zero length string "" as
a filter to get all messages:
zmq_setsocketopt(socket, ZMQ_SUSCRIBE, "", 0);
But in web sites I have seen examples like this:
zmq_setsocketopt(socket, ZMQ_SUSCRIBE, NULL, 0);
It may be related to first question. Which one is correct?
Thank you very much.
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev