AIR for Android SocketServer over WiFi

2019-06-10 16:22发布

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条回答
时光不老,我们不散
2楼-- · 2019-06-10 16:37

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/

查看更多
登录 后发表回答