[zeromq-dev] c struct as a zmq message
Martin Sustrik
sustrik at 250bpm.com
Fri Jan 7 14:21:24 CET 2011
Daniel,
> Is it possible to send a raw C structure via zmq with memcpy?
>
> According to documentation zmq doesn't know anything about the data to
> send except its size, so can I use memcpy to send C structure directly
> or I need to use the sprint/sscanf functions?
You can, but obviously there will be a problem with endianness, data
type length and structure padding between different systems.
Martin
More information about the zeromq-dev
mailing list