On Sep 30, 2009, at 9:59 AM, [email protected] wrote:
Before entering sleep I would like to send small amounts of data via
async instances of CFSocket to the local and some remote hosts.
It's usually best to close open sockets entirely before going to
sleep. The socket might not work anymore when the system wakes
(especially on a laptop). Also, it tells the peer on the other end you
won't be able to receive any data.
Now I presume that the 30 second sleep delay referred to in the docs
for NSWorkspaceWillSleepNotification means that my app can dawdle in
-appWillSleep for 30 seconds.
Is this correct?
If so then it seems likely that when this method returns the machine
may sleep before all the network data requests complete.
It shouldn't take 30 seconds to send a few packets to servers. And the
user really doesn't want a forced-sleep to be delayed — it's
frustrating when you shut your MacBook because you have to take it to
a meeting, and it sits and sits and sits before the sleep indicator
starts pulsing.
—Jens_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]