通过WiFi的AIR for Android SocketServer [英] AIR for Android SocketServer over WiFi

查看:91
本文介绍了通过WiFi的AIR for Android SocketServer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发适用于Android的多人游戏,并使用AIR SocketServer类在服务器与客户端AIR应用程序之间进行通信。

Developing a multiplayer game for Android and using the AIR SocketServer class to communicate between server and client AIR applications.

在Windows 8上,我使用Virtual Router Plus进行设置

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.

我的wifi运行后,我在cmd中运行ipconfig来抓取'下的ipv4 IP地址无线局域网适配器本地连接。

I run ipconfig in cmd after my wifi is running to grab the ipv4 IP address under 'Wireless LAN adapter Local Area Connection'

这是我在服务器应用程序中绑定并在客户端应用程序中连接的IP。

This is the IP I bind to in the server app and connect to in the client app.

如果我在同一台计算机上启动服务器和客户端,则一切正常。
在我的Android设备上安装客户端应用程序时,无法建立套接字连接。 WiFi在我的Android设备上正常运行。

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.

在通过本地wifi网络创建套接字服务器连接时,服务器上是否需要策略文件?
如果是这样,则客户端应用程序尝试连接时是否应该抛出安全错误?

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!

推荐答案

发生这种情况是因为AIR Socket通信仅在桌面应用程序中有效。
尝试使用此本机扩展名,它对我很有效:
http://blog.aboutme.be/2011/12/14/udp-native-extension-for-air-mobile-now-with-android -support /

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/

这篇关于通过WiFi的AIR for Android SocketServer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆