So the sending part (untested & uncompiled) is currently like this:
auto segments = message.getSegmentsForOutput();
auto it = segments.begin();
auto i = segments.size();
assert(i != 0);
while (--i != 0)
{
zmq_send_const(this->socket, reinterpret_cast<char const *>(&(*it)[0]), it->size() * sizeof(capnp::word),
ZMQ_SNDMORE);
++it;
}
zmq_send_const(this->socket, reinterpret_cast<char const *>(&(*it)[0]), it->size() * sizeof(capnp::word), 0);The question is how should I create a capnp message from the received parts of a zeromq multipart message? I read about word alignment, which is taken care of in the second of the above links. But it looks like a lot of copies, could they be avoided?
General hints/advices are welcome too. :)
Greetings,
Stephan
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
--