• 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
NSNetService resolution and sleep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSNetService resolution and sleep


  • Subject: NSNetService resolution and sleep
  • From: email@hidden
  • Date: Tue, 14 Dec 2010 15:01:01 +0000

My app has a client component and a server component.
The server publishes an NSNetService and the client discovers it using NSNetServiceBrowser.

When the Mac goes to sleep the client NSNetServiceBrowser delegate receives
- netServiceBrowser:didRemoveService:moreComing:

When the Mac awakes the client NSNetServiceBrowser delegate receives:
- netServiceBrowser:didFindService:moreComing:
- netServiceBrowser:didRemoveService:moreComing:
- netServiceBrowser:didFindService:moreComing:

In other words the NSNetService instance appears, disappears and then reappears after sleep.
I can deal with the sleep->remove + awake->find sequence okay but the extra service connection notifications are troublesome as it is hard to distinguish them from genuine service removal rather than an apparent side effect of sleep recuperation.

Is this expected or do I need to configure the service in some way with regard to sleep performance?
At present I simply let NSNetService do is it wills through the sleep.

Maybe this one of those cases where one's own expectations are simply out of whack with the black box.

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com







_______________________________________________

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

  • Prev by Date: Re: strategies for working w/ large amounts of text
  • Next by Date: Re: Record indentifier and the truth
  • Previous by thread: Best practice for receiving data
  • Next by thread: Re: assign property behaves differently from simple instance variable???
  • Index(es):
    • Date
    • Thread