On 28 Jun 2011 10:00:51 -0700, Jens Alfke <j...@mooseyard.com> posited:
> Assuming Œversion‚ is a 16-bit big-endian integer, you could read it like > this: The htons() and ntohs() C calls go from host-native integer (short) format to network format (big-endian), and from network format back to host-native short ints. There are also long versions of these calls. These calls are also implemented to provide correct operations on hosts systems that are little- and big-endian; they're portable across platforms. If you have to do more of this (at the C layer), then you might consider using the xdr external data representation calls, too. And FWIW, going the other way (from knowing C to learning Objective C) can be "fun", too. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com