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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,adb01e044e3e5aec X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-01 11:30:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!fu-berlin.de!uni-berlin.de!7189-cm.able.ES!not-for-mail From: Jano <402450@cepsz.unizar.es> Newsgroups: comp.lang.ada Subject: Re: Hints for networking Date: Sat, 1 Feb 2003 20:29:55 +0100 Message-ID: References: NNTP-Posting-Host: 7189-cm.able.es (212.97.171.89) X-Trace: fu-berlin.de 1044127798 37058331 212.97.171.89 (16 [49872]) X-Newsreader: MicroPlanet Gravity v2.50 Xref: archiver1.google.com comp.lang.ada:33682 Date: 2003-02-01T20:29:55+01:00 List-Id: En el mensaje , david.c.hoos.sr@ada95.com dice... Hello David, > 2. You need to write stream attributes for multi-octet numbers > that respect the bendiness of your platform. Even when > you've been told that "this only has to run on Sparc," sooner > or later your code will also need to run on Intel, so I've > always taken the trouble to deal with bendiness. I'm going to work on Intel but the protocol is using big endian fields, so I was already concerned about that. The only related thing I've found is the 'bit_order and system.default_bit_order, but I suspect that's related to storage representation and not to real byte ordering. Must I detect machine endingness manually? Are there helping packages for networking in the wild? > 3. All objects written to a stream must have a 'Size that is an > integer multiple of 8. So, if you have an octet with two four-bit > fields, I make them into a record type, and write the stream > attributes for that record. I've done things like a record that > has a 31-bit field, and a 1-bit field. I think that will not be a problem. I don't foresee streams of bits, all I'll need is 8-bit multiple types. So to conclude: I must define my "atomic" types and implement their own stream input/output attributes. Then construct the more complex packets using them. > Happy streaming! Thanks to all who answered! -- ------------------------- Jano 402450[at]cepsz.unizar.es -------------------------