From: Jano <402450@cepsz.unizar.es>
Subject: Re: Hints for networking
Date: Sat, 1 Feb 2003 20:29:55 +0100
Date: 2003-02-01T20:29:55+01:00 [thread overview]
Message-ID: <MPG.18a63e9a2821c3e998968d@News.CIS.DFN.DE> (raw)
In-Reply-To: mailman.4.1044048101.3911.comp.lang.ada@ada.eu.org
En el mensaje <mailman.4.1044048101.3911.comp.lang.ada@ada.eu.org>,
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
-------------------------
next prev parent reply other threads:[~2003-02-01 19:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-31 16:37 Hints for networking Jano
2003-01-31 18:40 ` tmoran
2003-01-31 21:21 ` David C. Hoos
2003-02-01 19:29 ` Jano [this message]
2003-02-02 7:43 ` Simon Wright
2003-02-01 18:32 ` Alfred Hilscher
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox