Re: DO problem with NSConnection/NSSocketPortNameServer
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