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=-0.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f25e636d6b770960,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-25 11:42:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: Erik Sigra Newsgroups: comp.lang.ada Subject: Last stream problem: byte order Date: Mon, 25 Mar 2002 20:45:37 +0100 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: avanie.enst.fr 1017085322 66068 137.194.161.2 (25 Mar 2002 19:42:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 25 Mar 2002 19:42:02 +0000 (UTC) Return-Path: X-Mailer: KMail [version 1.3.2] Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk X-Reply-To: sigra@home.se List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:21655 Date: 2002-03-25T20:45:37+01:00 Now my stream application almost works. The last remaining problem seems to be byte order. The server is programmed in C++ with Qt and the client is programmed in Ada with adasockets-1.0. The last thing I did was to change the byte order in the server ("the_stream.setByteOrder(QDataStream::LittleEndian);"). After that the numbers came out right at the other end. However, this may not be a safe solution. The safe way would probably be to always have the network communication in BigEndian format and make sure the client always obeys this, regardless of the platform. So how does one set the byte order to BigEndian on the Ada side? Or is there a different, better idea?