C++ÓëFlexÖ®¼äsocketͨÐÅpolicy file request½â¾ö·½°¸
C++winsocket·þÎñ¶Ë£¬Flex as3¿Í»§¶Ë¡£·þÎñ¶ËBind°ó¶¨IP127.0.0.1¶Ë¿Ú2020£¬ÔÚFlexÖÐʹÓÃSocket.connectÏò·þÎñÆ÷·¢ÆðÁ´½Ó¡£µ±FlexÔÚ±¾µØÔËÐеÄʱºòÄÜÁ´½Ó³É¹¦, µ«ÊÇͨ¹ýÓòÃû·ÃÎÊʱ³öÏÖSecurity´íÎó, Error #2048
¡£²¢ÇÒÔÚÁ¬½Óʱ, ·þÎñ¶ËÊÕµ½¿Í»§¶Ë·¢À´µÄÏûÏ¢<policy-file-request/>
ÏûÏ¢¡£
³¢ÊÔ½â¾ö:
ÉÏgoogleËÑË÷ÁËÈô¸É×ÊÁÏ£¬ÎÒ¿´ÁËÁ¼¾ÃÒ²Ò»Öª°ë½â¡£
³öÏÖÕâ¸öÎÊÌâµÄÔÒòÊÇFlashPlayerÓÐÒ»¸ö°²È«É³Ïä»úÖÆ
¡£±¾µØÔËÐÐswfʱ£¬flashPlayerĬÈϵݲȫ²ßÂÔÊÇ¿ÉÒÔ¿çÔ¤·ÃÎʵģ¬¿ÉÒԲ鿴Security.sandboxTypeÊôÐÔֵΪlocalTrusted¡£È»¶øÔÚʹÓÃIP·ÃÎÊswfÎļþʱ£¬flashPlayer»áÈÏΪÕâ¸öÎļþÊDz»°²È«µÄ´Ëʱ¿ÉÒԲ鿴
Security.sandboxTypeµÄÊôÐÔֵΪremote¡£´ËʱÐèÒªÔÚ·þÎñ¶Ë·ÅÖòßÂÔÎļþ£¬flashPlayer²Å»áÈÃswfÁ´½Óµ½´Ë·þÎñÆ÷¡£
Èô¸ÉÈ˵IJ©¿ÍÉ϶¼ËµÐèÒªÃûΪcrossdomain.xml
µÄÎļþ·ÅÖõ½·þÎñ¶ËHTTPµÄ¸ùĿ¼Ï¡£ÎļþÄÚÈÝΪ
<?xml version="1.0"?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="2020" />
</cross-domain-policy>
ÎÒÕâô×öÁË£¬µ«ÊÇûÓÐÈκÎЧ¹û¡££¨ÎÒÄÜÈ·¶¨²ßÂÔÎļþ±»·ÃÎʵ½ÁË£¬ÒòΪÎļþÖгöÏÖÓï·¨´íÎóµÄʱºòFlexµ÷ÊÔÐÅÏ¢Öл¹»á±¨³ö¾¯¸æ¡££©ÓÚÊÇÎÒ²ÂÏëÕâ¸ö·½·¨Ò²ÐíÊǽâ¾ö²»ÄÜ·ÃÎÊÔ¶³ÌHTTPÎļþµÄµÄÎÊÌ⣬¶øsocketͨÐÅÐèÒªÁíÍâµÄ·½·¨¡£
È»ºóÔÚCSDNÂÛ̳ÉÏ·¢ÏÖÓÐÈËÓÃJavaSocketºÍFlexͨÐųöÏÖͬÑùÎÊÌ⣬½â¾ö·½°¸ÊÇ·þÎñ¶ËÊÕµ½
<policy-file-request/>ÏûϢʱ£¬Ö±½ÓÏò¿Í»§¶Ë·¢ËÍÒ»ÌõÏûÏ¢£¬ÄÚÈݾÍÊÇÉÏÃæµÄ²ßÂÔÎļþµÄxml
¡£ÎÒ·ÂÕÕ×öÁË£¬ÒÀÈ»ÎÞЧ>_<
char szPolicy[1024] = "";
strcat_s(szPolicy, 1024, "<?xml version='1.0'?>");
strcat_s(szPolicy, 1024, "<cross-domain-policy>");
strcat_s(szPolicy, 1024, "<site-control permitted-cross-domain-policies='all'/>");
strcat_s(szPolicy, 1024, "<allow-access-from domain='*' to-ports='2020'/>");
strcat_s(szPolicy, 1024, "</cross-domain-policy>\0");
sockClient = m_sockListener.Accept(&addrClient);
if (sockClient.IsInvalid())
{
// accept failed
Ïà¹ØÎĵµ£º
º¯Êý´æ·ÅÔÚÄÚ´æµÄ´úÂëÇøÓòÄÚ£¬ËüÃÇͬÑùÓеØÖ·£¬ÎÒÃÇÈçºÎÄÜ»ñµÃº¯ÊýµÄµØÖ·ÄØ£¿
¡¡¡¡Èç¹ûÎÒÃÇÓÐÒ»¸öint test(int a)µÄº¯Êý£¬ÄÇô£¬ËüµÄµØÖ·¾ÍÊǺ¯ÊýµÄÃû×Ö£¬ÕâÒ»µãÈçͬÊý×éÒ»Ñù£¬Êý×éµÄÃû×Ö¾ÍÊÇÊý×éµÄÆðʼµØÖ·¡£
¡¡¡¡¶¨ÒåÒ»¸öÖ¸Ïòº¯ÊýµÄÖ¸ÕëÓÃÈçϵÄÐÎʽ£¬ÒÔÉÏÃæµÄtest()ΪÀý£º
¡¡¡¡int (*fp)(int a);//ÕâÀï¾Í¶¨ÒåÁËÒ»¸öÖ¸ ......
Flex 4
betaÌṩÁ˽ӿÚIViewport£¨±»ËùÓпɹö¶¯×é¼þʵÏÖ£©ºÍ×é¼þScroller£¨ÎªÊÓ¿ÚÌí¼Ó¹ö¶¯Ìõ£¬ÊµÏÖ½»»¥Ê±µÄ¹¦Äܹ¦ÄÜ£©¡£ÕâÀïËùνÊÓ¿Ú£¨viewport£©£¬¼´¿É¹ö¶¯×é¼þ£¬ÒªÊµÏÖIViewport½Ó¿Ú¡£½»»¥Ê½¹ö¶¯£¬ÊÇËùÓÐͼÐÎÓû§½çÃ棨GUI£©¹¤¾ßµÄ»ù±¾ÌØÐÔÖ®Ò»¡£Flex
4 betaÖ®ËùÒÔ²ÉÓÃÕâÖÖ·½·¨£¬ÊÇΪÁ˱ÈFlex 3µÄʵÏÖ¸üÓÐЧÂÊ£¬¾ßÌåÇ ......
×÷Õߣº Yanqing Wang (Intel)
ÔÚATOM³ÌÐòÓÅ»¯ÀûÆ÷ÖУ¬±ÊÕß×ÅÖؽ²ÊöÁËÈçºÎʹÓÃIntel Compiler¶ÔATOMÓ¦ÓóÌÐòµÄÓÅ»¯£¬ºÜ¶àÍøÓѶ¼±È½Ï¸ÐÐËȤ²¢ÏëÖªµÀÔÚGCC±àÒëÆ÷ÏÂÈçºÎÓÅ»¯ATOM¡£½è´Ë£¬±¾ÎĽ«ÖصãÓÚÌÖÂÛÈçºÎʹATOMÓ¦ÓóÌÐòÔÚGCC±àÒëÆ÷ÏÂÓÅ»¯¡£
ϸÐĵÄÍøÓÑ¿ÉÄÜ·¢ÏÖGCC4.4.2ÊÖ²áûÓн²ÊöÈçºÎÔÚATOMƽ̨ÓÅ»¯£¬ËùÒÔҪͨ¹ýGCC¶ÔAT ......
Flex±àÒë²ÎÊý
accessible=true|false ÊÇ·ñ¾ßÓпÉÀí½âÐÔ£¨ÈçΪ²Ð¼²ÈËÌṩ·½±ãµÄÐÔÄÜ£©
actionscript-file-encoding | ÉèÖÃÎļþ±àÂ룬ÈçShitf_JIS
advanced | mxmlc -help advanced£¬ÈçÕâÑùµÄ¸ß¼¶²ÎÊý
allow-source-path-overlap=true|false | ÑéÖ¤source-pathÖж¨ÒåµÄ·¾¶ÊÇ·ñ³öÏÖÖصþ£¬³öÏÖ»¥Ïà°üº¬µÄÏÖÏó
as3=true|fa ......
±¾ÏµÁÐÎÄÕÂÖ÷Òª½éÉÜÁ˹ØÓÚFlexÓë.NET½áºÏ¿ª·¢ÖеÄһЩ»¥²Ù×÷ÐÔ£¬°üÀ¨ÍøÂçͨÐÅ¡¢Êý¾Ý¼ÓÔØ¡¢Êý¾Ý´«Êä¡¢Îļþ´«Êä¡¢ÒÔ¼°Ó¦ÓÃÓÚFlexÓë.NETÐ×÷¿ª·¢µÄͨÐÅÍø¹Ø¿ªÔ´ÏîÄ¿FluorineFxµÄÏà¹Ø֪ʶµã¡£
¿ªÔ´ÏîÄ¿FluorineFx¾ÍÊÇרÃÅÕë¶Ô.NETƽ̨ÓëFlexͨÐÅÌṩµÄAMFÐÒéͨÐÅÍø¹Ø£¬ÎÒÃÇ¿ÉÒÔͨ¹ýFluorineFxºÜ·½±ã ......