Re: Address from NSSocketPort
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.