Re: why does this code NOT work on macbookpro?
Re: why does this code NOT work on macbookpro?
- Subject: Re: why does this code NOT work on macbookpro?
- From: Jonas Maebe <email@hidden>
- Date: Sun, 17 Sep 2006 21:45:40 +0200
On 17 Sep 2006, at 21:41, Justin C. Walker wrote:
If you know that client and server have the same endianness, it
works.
If you're not sure, you need to convert everything to network-
endian and back.
Network-endian is defined to be big-endian, so on PPC these are no-
ops.
This can only be true if you are very lucky. The receiving end
will likely assume you are sending in network order, and swap bytes
around.
I can only imagine that it works if your ip-addresses and ports
happen to be respectively 32 and 16 "hexadecimal palindromes" :)
(since the host's network stack will indeed already expect things in
network order, regardless of whether it's a little or big endian host)
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden