0

We are developing a turn based game that requires two players to connect over local wifi.

At the moment we are using Lee Burrows tutorial and code located here:

http://blog.leeburrows.com/2011/11/p2p-flash-on-a-local-network-part-3/

https://github.com/LeeBurrows/blog-source-code/blob/master/013%20P2P%20On%20LAN/src/P2PLan Example3.as

We are developing our app using Flash builder 4.6 and Adobe air and deploying to IOS and Android as a standalone application.

So far we have successfully managed to get a basic chat service up and running between two (and more) devices using the tutorial and code above.

Everything works fine and each device exchanges messages UNTIL the IOS app is put to sleep while the app is open. If we wake the device with the app still open and then try to post another message to the other peer when the app freezes and crashes.

Any ideas?

Thanks in advance...

4

1 回答 1

0

尽量不要让手机进入睡眠状态

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

于 2014-05-28T04:12:45.640 回答