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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to