[zeromq-dev] c struct as a zmq message
Daniel Cegiełka
daniel.cegielka at gmail.com
Fri Jan 7 14:36:43 CET 2011
Thanks!
2011/1/7 Martin Sustrik <sustrik at 250bpm.com>
> 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.
>
I use only c/c++ on linux :)
best regards,
Daniel
> Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110107/efd70701/attachment.htm>
More information about the zeromq-dev
mailing list