RE: iOS4: UDP sockets in the background
RE: iOS4: UDP sockets in the background
- Subject: RE: iOS4: UDP sockets in the background
- From: Angelica Grace Tanchico <email@hidden>
- Date: Fri, 25 Jun 2010 13:10:36 +0800
- Importance: Normal
Hi Robert,
Thanks for emphasizing this, but I am really confused. I have a VOIP app. How can I still have network connection in the background when my app uses network-socket connection?
Also according to document:
In order for your application to maintain a persistent connection
while it is in the background, you must configure the sockets used to
communicate with your VoIP service. In iPhone OS, most sockets are
managed using higher-level constructs such as streams. As a result,
configuration of a socket to support VoIP occurs through the
higher-level interfaces. The only thing you have to do beyond the
normal configuration is add a special key that tags the interface as
being used for a VoIP service.
But how can iOS4 support voip when the app uses bsd sockets (not the high level socket interface)?
Is there any way where I don't need to change my network implementation to high level sockets?
Thanks!
Angie
> Subject: Re: iOS4: UDP sockets in the background
> From: email@hidden
> Date: Fri, 25 Jun 2010 00:19:04 +0200
> CC: email@hidden; email@hidden
> To: email@hidden
>
>
> On 23.6.2010, at 20:15, Gerd Knops wrote:
>
> > I have been doing that without a problem since early iOS 3, so no reason to expect it would stop working in iOS4.
>
>
> FYI, doc quote ...
>
> Cancel any Bonjour-related services before being suspended. When your application moves to the background, and before it is suspended, it should unregister from Bonjour and close listening sockets associated with any network services. A suspended application cannot respond to incoming service requests anyway. Closing out those services prevents them from appearing to be available when they actually are not. If you do not close out Bonjour services yourself, the system closes out those services automatically when your application is suspended.
>
> Be prepared to handle connection failures in your network-based sockets. The system may tear down socket connections while your application is suspended for any number of reasons. As long as your socket-based code is prepared for other types of network failures, such as a lost signal or network transition, this should not lead to any unusual problems. When your application resumes, if it encounters a failure upon using a socket, simply reestablish the connection.
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969_______________________________________________
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