comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Endian problems - what best way to solve it with least effort
Date: Tue, 13 Mar 2012 19:23:32 +0100
Date: 2012-03-13T19:23:32+01:00	[thread overview]
Message-ID: <16aday0g91yxd.10dy19jeetdb9$.dlg@40tude.net> (raw)
In-Reply-To: 10483391.72.1331661651734.JavaMail.geo-discussion-forums@vbdj6

On Tue, 13 Mar 2012 11:00:51 -0700 (PDT), Anh Vo wrote:

> As the result, both application and client do
> not communicate correctly any longer due to endian mismatched. The reason
> is that Java VM uses Big Endian format even though the client runs on a PC.

You should implement the protocol in a machine-independent way, which is
quite simple to do in Ada: you read octets from the socket and compose
objects as you proceed. You define operations like Get_Unsigned_16 and
implement them (2-3 lines of code). On top of these you define further
operations etc.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2012-03-13 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 18:00 Endian problems - what best way to solve it with least effort Anh Vo
2012-03-13 18:23 ` Dmitry A. Kazakov [this message]
2012-03-13 18:29 ` Marc C
2012-03-13 18:35 ` Simon Wright
2012-03-14 15:54   ` Anh Vo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox