[zeromq-dev] zmsg.hpp
Ilja Golshtein
ilejncs at narod.ru
Thu Apr 28 16:00:41 CEST 2011
Hello,
a couple of questions about zmsg.hpp , mentioned in zguide.
1. Where is the official source of it? What is the status of the code?
2. In a version I've got in zeromq maillist I can see
==
zmq::message_t message(0);
try {
if (!socket.recv(&message, 0)) {
return false;
}
} catch (zmq::error_t error) {
printf("E: %s\n", error.what());
return false;
}
ustring data = (unsigned char*) message.data();
==
where ustring is
==
typedef std::basic_string<unsigned char> ustring;
==
The question is if it reliable to assume zeromq message is ASCIIZ, what
we effectively do in the latest line I've quoted?
Why we do this
==
data[message.size()] = 0
==
afterwards?
3. Is it good idea to do extra copy keeping message parts?
I mean if
==
std::vector<std::basic_string<unsigned char> > m_part_data;
==
reasonable storing approach?
Thanks.
--
Best regards,
Ilja Golshtein.
More information about the zeromq-dev
mailing list