• 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: Rendezvous not resolving on Panther, when compiled on Panther
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rendezvous not resolving on Panther, when compiled on Panther


  • Subject: Re: Rendezvous not resolving on Panther, when compiled on Panther
  • From: "Phil Barrett" <email@hidden>
  • Date: Mon, 3 Nov 2003 10:12:21 -0000

I've found the solution to my Rendezvous problem, which I'll pass on to help
others...

Original code:

-(void)netServiceBrowser:(NSNetServiceBrowser*)browser
didFindService:(NSNetService*)service moreComing:(BOOL)moreComing
{
NSLog(@"Found service %@\n", [service name]);
[service setDelegate:self];
[service resolve];
}

The system log showed error messages on the resolve call:
DNSServiceResolve("test", "_myservice._tcp.", "local.") failed: Client id -1
invalid (-65549)

The solution is merely to retain the service:

-(void)netServiceBrowser:(NSNetServiceBrowser*)browser
didFindService:(NSNetService*)service moreComing:(BOOL)moreComing
{
NSLog(@"Found service %@\n", [service name]);
[service retain];
[service setDelegate:self];
[service resolve];
}

The NSNetService passed to the didFindService callback has to be a
temporary, so retaining it for future use makes sense. But why it works on
Jaguar, and why the code compiled on Jaguar works on Panther, remains a
mystery.

Phil
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Rendezvous not resolving on Panther, when compiled on Panther
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Project Templates under XCode?
  • Next by Date: Re: Distributed Objects overkill?
  • Previous by thread: Re: Project Templates under XCode?
  • Next by thread: Re: Rendezvous not resolving on Panther, when compiled on Panther
  • Index(es):
    • Date
    • Thread