• 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: Distributed Objects and Bonjour
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distributed Objects and Bonjour


  • Subject: Re: Distributed Objects and Bonjour
  • From: Robert Sesek <email@hidden>
  • Date: Sat, 1 Jul 2006 10:54:14 -0700


On Jun 29, 2006, at 6:49 PM, Adam R. Maxwell wrote:


On Jun 29, 2006, at 16:11, Robert Sesek wrote:


On Jun 28, 2006, at 6:22 PM, Adam R. Maxwell wrote:

Finally, would it matter if I'm running the server and the client on the same machine (localhost) over the network? I don't think it should, but I'm wondering if it could be causing any problems. Because I did notice that when, in the client, I did: NSLog(@"service: %@", [netService hostName]); the value was (null).

If you were able to publish the service successfully, your client probably hasn't resolved the service yet with -[NSNetService resolveWithTimeout:]. You'll have to do that first, and then wait for the delegate method to be called.

One thing I notice happening is that in my run log, I get this:

2006-06-29 16:02:07.356 Simple Client[891] Warning: -[NSNetService resolve] is deprecated in Mac OS X 10.4. Please use -[NSNetService resolveWithTimeout:]

I'm not sure what's causing that.

This is from NSSocketPortNameServer; I filed rdar://problem/4507798 on this a while ago, since it's confusing to see.


#0 0x92a41760 in -[NSNetService(NSDeprecated) resolve]
#1 0x92a23adc in -[NSSocketPortNameServer portForName:host:nameServerPortNumber:]

I'll report it, too, to show that there's more interest in getting this fixed.




So I've now changed the structure of the code a little to implement the delegate system. I set the service's delegate to be self. Now the only thing that happens in connectToServer: is it tells the netService to resolveWithTimeout. The rest of the code from that method is moved to the delegate method netServiceDidResolveAddress (which runs successfully). And yet, the application still hangs on the same [connection rootProxy] line.



That sounds right. What happens if you log the net service name? Is it the same name you registered with NSSocketPortNameServer?



That was one of the problems! I wasn't specifying the right service name so things weren't matching up properly. After going through all your emails and looking at your code, I've finally gotten it to work exactly how I want it. Thank you for all your help!


Robert Sesek
Email: email@hidden
www.iris-studios.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Selected range in bound text view
  • Next by Date: Deleting ManagedObject with no undo... (fails testing)
  • Previous by thread: Re: Selected range in bound text view
  • Next by thread: Re: Distributed Objects and Bonjour
  • Index(es):
    • Date
    • Thread