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

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

  • Follow-Ups:
    • Re: DO problem with NSConnection/NSSocketPortNameServer
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: NSBox setContentView: messing with the cursor
  • Next by Date: Re: What's the point of @properties?
  • Previous by thread: Re: NSBox setContentView: messing with the cursor
  • Next by thread: Re: DO problem with NSConnection/NSSocketPortNameServer
  • Index(es):
    • Date
    • Thread