15 const std::string prefix=
"ZIO4TEXTTo be or not to be that ?";
17 zmsg_t* msg = zmsg_new();
18 zmsg_addstr(msg, prefix.c_str());
20 uint64_t a{0x6644444444444444},b{0x5555555555555555}, c{0x4466666666666666};
22 zmsg_addmem(msg, &xyz,
sizeof(XYZ));
23 zframe_t* frame = zmsg_encode(msg);
24 std::vector<std::uint8_t> ret(zframe_data(frame), zframe_data(frame) + zframe_size(frame));
28 zio::multipart_t cppmmsg = zio::multipart_t::decode(cppmsg);
29 assert(cppmmsg.size() == 2);
30 assert(cppmmsg.at(0).to_string() == prefix);
33 zframe_destroy(&frame);
38 for (
size_t ind=0; ind<ret.size(); ++ind) {
39 zio::debug(
"{}: {} ({})", ind, ret[ind], (
int)ret[ind]);