on deeper research i found this:
There's a Technical Note on this:
http://developer.apple.com/library/ios/#technotes/tn2277/_index.html
In my app, in the App Delegate:
on applicationDidEnterBackground: I stop the HTTP serveron
applicationWillEnterForeground: I start the HTTP serverThis makes the server
usable after someone hits the lock screen.
see if you have these events exposed in the AIR framework. I bet you can work
around this issue if they are.
> From: [email protected]
> To: [email protected]
> Subject: RE: ServerSockect breaks on deactivate/suspend?
> Date: Mon, 16 Dec 2013 11:05:08 -0300
>
> My initial reaction is that this should stay working in the background...
> however it may have something to do with the "suspend" state that iOS applies
> to an app when locking the device.
>
> https://github.com/robbiehanson/CocoaHTTPServer/issues/10
>
> this appears to be an issue with the native socket implementation. Perhaps
> the fork of this project can be used to hack some fix into the ServerSocket
> flex class...
>
> > From: [email protected]
> > To: [email protected]
> > Date: Thu, 12 Dec 2013 11:01:13 +0000
> > Subject: RE: ServerSockect breaks on deactivate/suspend?
> >
> > Can you destroy on EVENT.DEACTIVATE?
> >
> > -----Original Message-----
> > From: fredrossperry [mailto:[email protected]]
> > Sent: 10 December 2013 23:53
> > To: [email protected]
> > Subject: ServerSockect breaks on deactivate/suspend?
> >
> > Building an iOS app using FlashBuilder 4.7 and Apache Flex 4.11.
> > Using ServerSocket to make an in-app HTTP server so I can use StageWebView
> > to view HTML5/Javascript content that's built into the app. Works great
> > until I hit the screen lock button on the iPad.
> > After that point my ServerSocket stops working.
> >
> > On Event.ACTIVATE, I can create a new ServerSocket on a different port, and
> > that works. But the previous ServerSocket won't, nor can I destroy it and
> > start a new one on the SAME port (which is really what I need to do).
> >
> > Thoughts? Questions? thanks.
> >
> >
> >
> > --
> > View this message in context:
> > http://apache-flex-users.2333346.n4.nabble.com/ServerSockect-breaks-on-deactivate-suspend-tp4156.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> > dunnhumby limited is a limited company registered in England and Wales with
> > registered number 02388853 and VAT registered number 927 5871 83.
> > Our registered office is at Aurora House, 71-75 Uxbridge Road, London W5
> > 5SL.
> > The contents of this message and any attachments to it are confidential and
> > may be legally privileged.
> > If you have received this message in error you should delete it from your
> > system immediately and advise the sender.
> > dunnhumby may monitor and record all emails. The views expressed in this
> > email are those of the sender and not those of dunnhumby.
> >
>