[zeromq-dev] c struct as a zmq message

Bob Beaty drbobbeaty at gmail.com
Fri Jan 7 14:22:36 CET 2011


> Is it possible to send a raw C structure via zmq with memcpy?

I use the following, and it works quite well for me:

zmq::message_t    msg(aPayload.size());
memcpy(msg.data(), aPayload.data(), aPayload.size());

No problem.

        Bob (drbobbeaty at gmail.com)
    The Man from S.P.U.D.
    We will write no code before it's designed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110107/0b8447bc/attachment.htm>

More information about the zeromq-dev mailing list