• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: why does this code NOT work on macbookpro?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why does this code NOT work on macbookpro?


  • Subject: Re: why does this code NOT work on macbookpro?
  • From: Henri Asseily <email@hidden>
  • Date: Sun, 17 Sep 2006 23:34:15 +0200



On Sep 17, 2006, at 9:45 PM, Jonas Maebe wrote:


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)

I forgot about the ip address and port. I was thinking data only... and if you're the one coding both the client and server, and they're both in the same endianness, you are "very lucky". Not recommended though :)


H
_______________________________________________
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


References: 
 >why does this code NOT work on macbookpro? (From: Perry Winkel <email@hidden>)
 >Re: why does this code NOT work on macbookpro? (From: "Clark Cox" <email@hidden>)
 >Re: why does this code NOT work on macbookpro? (From: Henri Asseily <email@hidden>)
 >Re: why does this code NOT work on macbookpro? (From: "Justin C. Walker" <email@hidden>)
 >Re: why does this code NOT work on macbookpro? (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: visibility weirdness...
  • Next by Date: newbie
  • Previous by thread: Re: why does this code NOT work on macbookpro?
  • Next by thread: visibility weirdness...
  • Index(es):
    • Date
    • Thread