• 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: "byte orders" question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "byte orders" question


  • Subject: Re: "byte orders" question
  • From: "Glenn L. Austin" <email@hidden>
  • Date: Fri, 25 Nov 2011 16:07:49 -0800

On Nov 25, 2011, at 2:56 PM, Koen van der Drift wrote:

> On Nov 25, 2011, at 5:44 PM, Scott Ribe wrote:
>
>> As another response suggested, what's wrong with ntohl???
>
> I implemented that function based on some code I found online, but got very weird results, which is why I asked here.  My knowledge on these esoteric functions apparently isn't up to par :)
>
> As long as I end up with an array of x,y values, I really don't care how I get there.  Eventually they will need to end up in an NSArray for further processing though.

That function is already implemented on every machine that support networking -- including Mac OS X.  You don't need to implement it yourself -- just #include <arpa/inet.h>

Do a man ntohl for more info.

--
Glenn L. Austin, Computer Wizard and Race Car Driver         <><
"Where there's breath, there's hope!"
<http://www.austin-soft.com>

_______________________________________________

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

  • Follow-Ups:
    • Re: "byte orders" question
      • From: Koen van der Drift <email@hidden>
References: 
 >"byte orders" question (From: Koen van der Drift <email@hidden>)
 >Re: "byte orders" question (From: Ben Kennedy <email@hidden>)
 >Re: "byte orders" question (From: Koen van der Drift <email@hidden>)
 >Re: "byte orders" question (From: Scott Ribe <email@hidden>)
 >Re: "byte orders" question (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: "byte orders" question
  • Next by Date: Re: NSTableView Binding NSSortDescriptor
  • Previous by thread: Re: "byte orders" question
  • Next by thread: Re: "byte orders" question
  • Index(es):
    • Date
    • Thread