[zeromq-dev] c struct as a zmq message
Pieter Hintjens
ph at imatix.com
Fri Jan 7 18:27:11 CET 2011
Honestly, there are few big-endian CPUs and that's a minor reason for
creating formalized messages. Much more relevant is documenting the
interfaces, contracts between components so you can build and maintain them
independently. In serious ZeroMQ projects we write XML specs for every
message, and use a code generator (gsl, see imatix/gsl on github) to create
codecs in whatever language needed. I hope to describe this further in the
Guide. It makes architecture much cleaner and simpler.
Having said that, it is overkill for smaller projects. Send C structures
around, but be aware of the limitations.
- Pieter
On 7 Jan 2011 17:14, "Ivan Pechorin" <ivan.pechorin at gmail.com> wrote:
>
>
> On 07.01.2011, at 16:56, Martin Sustrik <sustrik at 250bpm.com> wrote:
>
>> On 01/07/2011 02:36 PM, Daniel Cegiełka wrote:
>>
>>> I use only c/c++ on linux :)
>>
>> Say the endianness depends on the processor. Using C/C++ or Linux
>> doesn't affect it in any way.
>
> On the same Intel Itanium2 processor Linux is little-endian, but HP-UX is
big-endian.
>
>>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110107/23ced85b/attachment.htm>
More information about the zeromq-dev
mailing list