DO problem with NSConnection/NSSocketPortNameServer
DO problem with NSConnection/NSSocketPortNameServer
- Subject: DO problem with NSConnection/NSSocketPortNameServer
- From: Ken Tozier <email@hidden>
- Date: Fri, 24 Sep 2010 02:35:41 -0400
Hi
I'm writing a client/server application and can't get a valid NSConnection when I try to use NSSocketPortNameServer
This works, locally, but I need a connection that will work on the network
server = [[NSConnection serviceConnectionWithName: @"PMXServer"
rootObject: self
usingNameServer: [NSPortNameServer systemDefaultPortNameServer]]
retain];
I can connect to the vended object from the client using
server = [[NSConnection rootProxyForConnectionWithRegisteredName: @"PMXServer"
host: nil
usingNameServer: [NSPortNameServer systemDefaultPortNameServer]]
retain];
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.
Anyone know why it isn't?
Thanks for any help
_______________________________________________
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