"byte orders" question
"byte orders" question
- Subject: "byte orders" question
- From: Koen van der Drift <email@hidden>
- Date: Fri, 25 Nov 2011 15:58:21 -0500
I'm trying to implement the following code into my Cocoa project:
for (n = 0 ; n < (2 * count) ; n++)
{
((u_int32_t *) result)[n] = ntohl((u_int32_t) ((u_int32_t *) decoded)[n]);
}
with the following requirements:
// byte order correction decoded has network byte order data
// result has the byte order of the host machine
decoded is an NSData object after base64 decoding.
How do I obtain the "network byte order data" and "byte order of the host machine" so I get the correct results?
Thanks,
- Koen._______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden