Network.Socket endian problem?

Tomasz Zielonka tomasz.zielonka at gmail.com
Thu Dec 14 15:18:52 EST 2006


On Thu, Dec 14, 2006 at 05:22:43PM +0100, Ferenc Wagner wrote:
> Tomasz Zielonka <tomasz.zielonka at gmail.com> writes:
> 
> > On Wed, Dec 13, 2006 at 03:54:59PM -0600, Mark Hills wrote:
> >> It does expect the address to be in network byte order instead of host
> >> byte order, which is usually done using htons and htonl. This seems to
> >> do what you want (running SUSE 10.1 on an Intel box):
> >
> > Who agrees with me that it would be nice if network libraries used host
> > byte order in their interface? Or at least they could use an abstract
> > data type, whose byte order would be unobservable.
> 
> Why is this trapdoor present in the C library?

I don't know.
Maybe for efficiency?

Best regards
Tomasz


More information about the Glasgow-haskell-users mailing list