[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: int vs. struct



Greg Miller wrote:
> 
> Dan Stromberg wrote:
> >
> > Yes, any ADT that is to be saved on disk or transmitted over the net (or
> > given any other external form) should have a conversion from host byte
> > order (and FP format, &c) to network byte order (&c).
> 
> Unfortunately, those aren't the only cases... Anything that gets placed
> in a .DLL, .LIB, or equivalent is subject to the same restrictions.

Shared libraries should generally use host order for efficiency, until
data is sent outside the program with which they are linked.

Why ever would a library that never ships data outside a program, want
to fiddle with network byte order?