作者:清露1122_664 | 来源:互联网 | 2023-09-11 11:05
ImworkinginacompanywhichcreatesahugestrategygamewithActionScript3.我在一家公司工作,用ActionScri
I'm working in a company which creates a huge strategy game with ActionScript3.
我在一家公司工作,用ActionScript3创建一个巨大的策略游戏。
I'm one of the developers here and have some issues with Socket Connections. Socket works perfect when I use it in internal flash player or in firefox debug, it shows socket error #2048 when I'm trying to open the project with Google Chrome.
我是这里的开发人员之一,并且在套接字连接方面存在一些问题。当我在内部flash播放器或firefox调试中使用它时,套接字工作正常,当我尝试使用谷歌浏览器打开项目时,它显示套接字错误#2048。
Here is the code which I use at first before trying to make a Socket Connection.
这是我在尝试建立套接字连接之前首先使用的代码。
Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.loadPolicyFile("mydomain.com/crossdomain.xml");
And here is the content of crossdomain.xml file.
这是crossdomain.xml文件的内容。
Then the connect function works to make a Socket Connection with server.
然后connect函数用于与服务器建立Socket连接。
instance.host = host;
instance.port = port;
socket = new Socket(host, port); //Initializing the socket
Is there any problems with Server or the problem caused by Chrome? If you had the same issue and found something useful please answer to this question. I'm searching a solution for a few days, but nothing works.
服务器是否有问题或Chrome导致的问题?如果你遇到同样的问题并找到了有用的东西,请回答这个问题。我正在寻找解决方案几天,但没有任何作用。
1 个解决方案