[zeromq-dev] c struct as a zmq message

Martin Sustrik sustrik at 250bpm.com
Fri Jan 7 14:21:24 CET 2011


> 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.


More information about the zeromq-dev mailing list