Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
FlashLite 2.x/3.0跨域策略文件_Flash_Sockets_Actionscript_Flashlite - Fatal编程技术网

FlashLite 2.x/3.0跨域策略文件

FlashLite 2.x/3.0跨域策略文件,flash,sockets,actionscript,flashlite,Flash,Sockets,Actionscript,Flashlite,根据我对swf跨域请求的Adobe文档的理解,服务器上需要两种类型的策略文件: URL策略文件:该文件名为“crossdomain.xml”,存储在服务器的根目录中,通常是对服务器的http请求。 System.security.loadPolicyFile(“http://foo.com/crossdomain.xml"); 套接字策略文件:这是通过xmlsocket协议在端口843上使用saySystem.security.loadPolicyFile(“xmlsocket://foo.co

根据我对swf跨域请求的Adobe文档的理解,服务器上需要两种类型的策略文件:

  • URL策略文件:该文件名为“crossdomain.xml”,存储在服务器的根目录中,通常是对服务器的http请求。
    System.security.loadPolicyFile(“http://foo.com/crossdomain.xml");

  • 套接字策略文件:这是通过xmlsocket协议在端口843上使用say
    System.security.loadPolicyFile(“xmlsocket://foo.com:843");


  • 问题是,如果我的FLashLite客户端只使用套接字(通过xmlSocket)与服务器进行通信,我是否仍然需要通过http请求crossdomain.xml,或者我是否可以跳过步骤1,在步骤2直接请求套接字策略文件?

    如果您的FLashLite客户端位于同一域中,即使要通过http与服务器通信,也不需要http
    crossdomain.xml
    文件。跨域访问需要xml
    ,而不是相同的域访问


    无论您的swf驻留在何处,都需要xmlsocket策略文件,这是不同的。

    如果您的FlashLite客户端驻留在同一个域中,您不需要http
    crossdomain.xml文件,即使您要通过http与服务器通信-
    crossdomain.xml
    是跨域访问所必需的,不适用于相同的域访问


    无论您的swf驻留在哪里,都需要xmlsocket策略文件,这是不同的。

    我的flashlite客户端不驻留在同一个域上。在这种情况下,我的flashlite客户端不在同一个域中是必需的。那是必要的吗