Re: Network byte order and floating-point numbers

From: QNils_O=2E_Sel=E5sdal=22?= (NOS_at_Utel.no)
Date: 06/07/04


Date: Mon, 07 Jun 2004 14:39:01 +0200

Owen Jacobson wrote:

> Salve.
>
> I'm writing an application that interfaces, over a network connection,
> with a server that provides georeferenced images. Until now, all the
> clients for this server have been Windows clients, which has worked fine;
> the actual protocol is based on sending struct{...}s over the connection.
> For the most part, it's pretty clean for converting between network and
> host byte orders.
>
> However, some of the structures contain elements of type double, which
> are, to my knowledge, not converted in any of the existing clients. Is
> there a standard binary format/byte ordering for sending floating-point
> numbers over a network connection, as there is for 2-octet and 4-octet
> integers, or is this entirely implementation-dependent?
>
> Owen
Implementation dependant afaik..
Send them as ascii characters, or use XDR (man xdr)


Loading