• 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: Address from NSSocketPort
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Address from NSSocketPort


  • Subject: Re: Address from NSSocketPort
  • From: Sherm Pendley <email@hidden>
  • Date: Tue, 18 Jun 2002 19:27:39 -0400

On Tuesday, June 18, 2002, at 07:10 PM, j o a r wrote:

struct sockaddr_in addrIn = *(struct sockaddr_in *)addrData;

I think your problem is this line. You can't simply typecast an NSData pointer to get at the data the object contains. Instead, you call NSData's "bytes" method, which returns a pointer to the data, like this:

struct sockaddr_in addrIn = *(struct sockaddr_in *)[addrData bytes];

Hope this helps!

sherm--

Never put off until tomorrow what you can do today. There might be a law against it by that time.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Address from NSSocketPort
      • From: j o a r <email@hidden>
References: 
 >Address from NSSocketPort (From: j o a r <email@hidden>)

  • Prev by Date: Re: Rotated display of bitmap images?
  • Next by Date: Re: Protecting Software w/ Software License -- a modest proposal
  • Previous by thread: Address from NSSocketPort
  • Next by thread: Re: Address from NSSocketPort
  • Index(es):
    • Date
    • Thread