Re: backgrounding a udp socket
Re: backgrounding a udp socket
- Subject: Re: backgrounding a udp socket
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Fri, 11 Sep 2015 08:35:49 +0100
On 11 Sep 2015, at 00:32, Michael Brian Bentley <email@hidden> wrote:
> Is it possible to set up a udp socket via a background task using
>
> -beginBackgroundTaskWithName:expirationHandler:
>
> (or something like it) such that we're able to continue receiving datagrams while the app is backgrounded?
The advice from Technote 2277 "Networking and Multitasking" still applies.
<https://developer.apple.com/library/ios/#technotes/tn2277/_index.html>
iOS has no special support for UDP networking in the background, so the only way to do this is to prevent your app from suspending (-beginBackgroundTaskWithName:xxx is one way to do that).
There's good news and bad news on that front:
* The good news is that, if you prevent your app from suspending, there's no difference between networking in the background vs the foreground.
* The bad news is that the system puts strict limits on how long you can run in the background (to preserve device standby time).
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden