• 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: backgrounding a udp socket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: backgrounding a udp socket
      • From: Adam Kaplan <email@hidden>
References: 
 >backgrounding a udp socket (From: Michael Brian Bentley <email@hidden>)

  • Prev by Date: Re: Need advice about [NSInputStream read:maxLength:] performance.
  • Next by Date: Re: backgrounding a udp socket
  • Previous by thread: Re: backgrounding a udp socket
  • Next by thread: Re: backgrounding a udp socket
  • Index(es):
    • Date
    • Thread