问题
Developing a multiplayer game for Android and using the AIR SocketServer class to communicate between server and client AIR applications.
On Windows 8 I am using Virtual Router Plus to set up my PC laptop(where the server app is running) as a wifi hotspot.
I run ipconfig in cmd after my wifi is running to grab the ipv4 IP address under 'Wireless LAN adapter Local Area Connection'
This is the IP I bind to in the server app and connect to in the client app.
If I launch both server and client on the same machine, everything works fine. When I install the client app on my Android device, I am unable to establish a socket connection. The WiFi is running properly on my Android device.
Is a policy file necessary on the server machine when creating socketserver connections over a local wifi network? If so, shouldn't the client app be throwing a security error when it tries to connect?
I am lost as to what my troubleshooting steps should be. ANY tips or feedback appreciated!
回答1:
This happend because, the AIR Socket communication works only in Desktop application. Try this native extension, it works perfectly form me: http://blog.aboutme.be/2011/12/14/udp-native-extension-for-air-mobile-now-with-android-support/
来源:https://stackoverflow.com/questions/15181993/air-for-android-socketserver-over-wifi