From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,19b0bf5b6906d2e7,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: "markp" Newsgroups: comp.lang.ada Subject: Using GNAT.Sockets with Streams and Byte Swapping Date: 25 May 2005 02:48:06 -0700 Organization: http://groups.google.com Message-ID: <1117014486.871500.288200@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: 208.20.220.69 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1117014492 344 127.0.0.1 (25 May 2005 09:48:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 25 May 2005 09:48:12 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=208.20.220.69; posting-account=_Inhcg0AAAAPC2BsuUqoGG-atarvM4_J Xref: g2news1.google.com comp.lang.ada:11146 Date: 2005-05-25T02:48:06-07:00 List-Id: I am having a problem using GNAT.socket with streams. I can create a stream easily and send data as follows: Msg_Type'Write( My_Stream_Access, Msg); This will work fine of both machines are the same "endian". However, if I need to swap bytes on the variable Msg before I send, I get garbled data on the other end. Is there a problem with swapping bytes before the call to 'Write? Thanks