我正在运行使用PHP的套接字服务器。套接字服务器运行良好,因为我可以使用PHP连接到它。闪存/ Flex和PHP套接字应用程序沙盒错误
现在,我有一个尝试连接到其Flash应用程序:
this.socket.addEventListener(Event.CONNECT, onSocketConnect);
this.socket.addEventListener(Event.CLOSE, onSocketClose);
this.socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
this.socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecError);
try {
this.socket.connect("myip", 9999);
} catch (ioError:IOError) {
this.debugLbl.text += "ioError1 "+ioError.message;
} catch (secError:SecurityError) {
this.debugLbl.text += "secError1 "+secError.message;
}
当我在本地运行应用程序,它的工作原理!但是,当我将其上传到我的服务器时,我收到了一个沙盒安全错误(#2048)。 Flash应用程序实际上与套接字服务器位于同一台服务器上,并且存在跨域策略文件。
更新:当我运行的Flash应用程序,我的服务器实际接收并接受套接字请求。但是,然后客户端/ Flash应用程序显示沙箱错误 – 2010-12-03 06:14:24