• 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: NSNetService won't resolve
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNetService won't resolve


  • Subject: Re: NSNetService won't resolve
  • From: Benjámin Salánki <email@hidden>
  • Date: Mon, 03 Nov 2008 04:25:47 +0100

And obvious it was. Thanks!

Ben


On 2008.11.03., at 3:31, Marc Krochmal <email@hidden> wrote:

Hi Benjámin,

On Oct 31, 2008, at 10:37 AM, Benjámin Salánki wrote:

Hi all,

I have an NSNetService enabled app that acts as both the client and the server on the same machine.
My problem is that once I register the service I create and I want to set up the connection the aNetService returned has an empty array for the addresses in


- (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser
          didFindService:(NSNetService *)aNetService
              moreComing:(BOOL)moreComing

now if I call

   [aNetService setDelegate:self];
   [aNetService resolveWithTimeout:5.0];

neither - (void)netServiceDidResolveAddress:(NSNetService *)sender nor - (void)netService:(NSNetService *)sender didNotResolve: (NSDictionary *)errorDict get called even though I set the delegate and everything.
I have written some Bonjour based applications before all based on Apple's Picture sharing sample code and I have not faced this problem before.


Is there something obvious I'm missing here?

You need to retain aNetService before resolving.

-Marc
_______________________________________________

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


References: 
 >Re: NSNetService won't resolve (From: Marc Krochmal <email@hidden>)

  • Prev by Date: Re: NSTableView problems
  • Next by Date: Re: External Program Control from within Cocoa App
  • Previous by thread: Re: NSNetService won't resolve
  • Next by thread: NSTableView problems
  • Index(es):
    • Date
    • Thread