NSNetService resolution and sleep
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