• 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: DO problem with NSConnection/NSSocketPortNameServer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DO problem with NSConnection/NSSocketPortNameServer


  • Subject: Re: DO problem with NSConnection/NSSocketPortNameServer
  • From: Ken Thomases <email@hidden>
  • Date: Fri, 24 Sep 2010 09:47:11 -0500

On Sep 24, 2010, at 1:35 AM, Ken Tozier wrote:

> However, when I try to use NSSocketPortNameServer instead of NSPortNameServer, I get server = nil
>
> server = [[NSConnection serviceConnectionWithName: @"PMXServer"
> 		rootObject: self
> 		usingNameServer: [NSSocketPortNameServer sharedInstance]]
> 		retain];
>
> The documentation here serviceConnectionWithName:rootObject:usingNameServer: seems to indicate that this should work.

I may have been the one to direct you to this method, but I honestly don't know if this approach is supposed to work.  Seems like it should, but...

In any case, it would just be a convenience method wrapping some other approaches.  I recommend that you try creating a receive NSSocketPort yourself and using +connectionWithReceivePort:sendPort: and -registerName:withNameServer:.

In other words, my suspicion for why the other method isn't working is that it doesn't know how to create NSSocketPorts to go along with the specified name server.  It's trying to use generic NSPorts or something.

Regards,
Ken

_______________________________________________

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: DO problem with NSConnection/NSSocketPortNameServer
      • From: Ken Tozier <email@hidden>
References: 
 >DO problem with NSConnection/NSSocketPortNameServer (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: What's the point of @properties?
  • Next by Date: Subclass NSTableView
  • Previous by thread: DO problem with NSConnection/NSSocketPortNameServer
  • Next by thread: Re: DO problem with NSConnection/NSSocketPortNameServer
  • Index(es):
    • Date
    • Thread