• 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: NSSocketPort vs. AF_UNIX?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSocketPort vs. AF_UNIX?


  • Subject: Re: NSSocketPort vs. AF_UNIX?
  • From: Tom Harrington <email@hidden>
  • Date: Tue, 30 Aug 2005 17:48:04 -0600

On 8/30/05, Kaelin Colclasure <email@hidden> wrote:
> On Aug 30, 2005, at 4:09 PM, Tom Harrington wrote:
> >     struct sockaddr_un name;
> >     memset(&name, 0, sizeof(struct sockaddr_un));
> >     name.sun_family = AF_UNIX;
> >     strcpy(name.sun_path, "/tmp/af_unix.test");
> >     int len = sizeof(name.sun_family) + strlen(name.sun_path);
> >
> >     NSData *addrData = [NSData dataWithBytes:&name length:len];
> >
> > But that didn't work any better.
>
> Try changing that last line to:
>
>      NSData * addrData = [NSData dataWithBytes:&name length:sizeof
> (name)];

That seems to do it.  I was using "len" because that's what I'd
normally pass to bind(), but I guess that's not what I needed here.
Thanks.

--
Tom Harrington
email@hidden
AIM: atomicbird1
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSSocketPort vs. AF_UNIX? (From: Tom Harrington <email@hidden>)
 >Re: NSSocketPort vs. AF_UNIX? (From: Kaelin Colclasure <email@hidden>)

  • Prev by Date: making a copy of text in document window
  • Next by Date: Re: making a copy of text in document window
  • Previous by thread: Re: NSSocketPort vs. AF_UNIX?
  • Next by thread: What's happening with PNG ?
  • Index(es):
    • Date
    • Thread