help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Endian Conversion


From: Paul Pluzhnikov
Subject: Re: Endian Conversion
Date: Wed, 06 Feb 2008 09:23:46 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

emp1953 <edgar.purdy@lmco.com> writes:

> When I received the linux machine I find that it is little endian.

Was that a surprise to you?

I mean, it is the first and most obvious question when defining wire
protocol: is the target environment homogeneous (no conversions
necessary) or heterogeneous (must take care of packing, alignment
and byte order).

> I must convert each data type individually before it goes on the
> socket.
> Does anyone know of any reliable code that exists that I can easily
> plug into my application?

Sun XDR is an obvious candidate.

How easy it is to plug into your application depends on how much
you thought about the possibility that you'll need to do that.

Also, depending on the amount of data, converting it to a formatted
text stream and back (e.g. via JSON (www.json.org)) will probably
make debugging much easier.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]