Re: Network byte order and floating-point numbers
From: Owen Jacobson (angstrom_at_lionsanctuary.net)
Date: 06/14/04
- Next message: Programmer Dude: "Re: Tutorial and guidelines: Coding standards (long message)"
- Previous message: Steve Jorgensen: "Re: Open source alternative for MsAccess?"
- In reply to: Reinder Verlinde: "Re: Network byte order and floating-point numbers"
- Next in thread: Phil Frisbie, Jr.: "Re: Network byte order and floating-point numbers"
- Reply: Phil Frisbie, Jr.: "Re: Network byte order and floating-point numbers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 14 Jun 2004 16:26:51 GMT
On Sun, 13 Jun 2004 17:53:42 +0200, Reinder Verlinde wrote:
> In article <pan.2004.06.07.01.35.23.59926@lionsanctuary.net>,
> Owen Jacobson <angstrom@lionsanctuary.net> wrote:
>
>> the actual protocol is based on sending struct{...}s over the connection.
>
> If you mean that you write sizeof( aStruct) bytes, passing a pointer to
> aStruct: that is not even portable between equal-endian systems.
> Different systems, compilers or even compiler settings will lead to
> different padding inside structures.
I'm well aware of that. Unfortunately, the guys involved in writing the
server half of the application are very much Windows people, where this is
normal behaviour and even works reasonably well (between Windows machines).
Sigh.
>> Is there a standard binary format/byte ordering for sending
>> floating-point numbers over a network connection
>
> Your best bet probably is to use a text-based format.
If I could rewrite the request format I would've done it already. I'm
just stuck writing a client application on linux. It's the right answer,
but I can't apply it.
> Second-best, but possibly good enough would be a IEEE floating point
> format. Study your compilers to see whether they support it. You will
> still have to do do endian conversion.
That's what I was hoping. Thanks.
Owen
-- Some say the Wired doesn't have political borders like the real world, but there are far too many nonsense-spouting anarchists or idiots who think that pranks are a revolution.
- Next message: Programmer Dude: "Re: Tutorial and guidelines: Coding standards (long message)"
- Previous message: Steve Jorgensen: "Re: Open source alternative for MsAccess?"
- In reply to: Reinder Verlinde: "Re: Network byte order and floating-point numbers"
- Next in thread: Phil Frisbie, Jr.: "Re: Network byte order and floating-point numbers"
- Reply: Phil Frisbie, Jr.: "Re: Network byte order and floating-point numbers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|