Re: Distributed Objects and Bonjour
Re: Distributed Objects and Bonjour
- Subject: Re: Distributed Objects and Bonjour
- From: "Adam R. Maxwell" <email@hidden>
- Date: Thu, 29 Jun 2006 18:49:57 -0700
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:]
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?
-- Adam
_______________________________________________
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