FLASH+JAVA¿ª·¢ÊµÊ±ÍøÂçÓÎÏ·
±¾ÎÄ·ÖÁ½²¿·Ö£ºFLASH±à³Ì ºÍ Java±à³Ì£¬´ËÎļǼµÄ½ö½öÊÇÎÒÔÚ̽Ë÷ÖеÄһЩÊÕ»ñ£¬ÆäÖÐÓÃÁ˺ܶà¸öÈË»¯µÄÃèÊöÓïÑÔ£¬²¢²»ÊÇÒµ½ç±ê×¼µÄÓÃÓï¡£ £º£©
̽Ë÷±Ê¼Ç£º
Ŀǰ¹úÄÚFlashÓ¦Óô󲿷ֻ¹ÊÇÔÚÖÆ×÷¾«ÃÀµÄ¶¯»·½Ã棬µ«¾ÝÎÒÁ˽âÔçÔÚFlash4 µÄʱ´ú£¬¹úÍâһЩÈ˾ÍÒѾ¿ªÊ¼½«flash¼¼ÊõÔËÓÃÓÚ¿ª·¢¶¯Ì¬ÍøÕ¾£¨ºÍphp¡¢asp¡¢jsp½áºÏ£©ºÍ¿ª·¢Ó¦ÓóÌÐò£¨ÏóÍøÂçÓÎÏ·¡¢Ô¶³Ì¹ÜÀíµÈÓ¦ÓÃÈí¼þ£©µÄÏîÄ¿ÖÐÁË¡£¶øÖ±µ½½ñÈÕ£¬Õâ·½ÃæÔÚ¹úÄÚ·¢Õ¹»¹ÊDZȽϻºÂý£¨ÓÐÒ»²¿·ÖÔÒòÊÇÉÙÊýÈËÕÆÎÕÁ˹ؼü¼¼Êõ£¬µ«²»Ô¸Òâ¹²Ïí³öÀ´£©¡£Òò´Ë£¬ÎÒ½«ÖÂÁ¦ÓÚÍÆ¶¯¹úÄÚflash¼¼ÊõÔÚ¿ª·¢¶¯Ì¬ÍøÕ¾ºÍ¿ª·¢Ó¦ÓóÌÐò·½ÃæµÄ·¢Õ¹£¬²¢½«×Ô¼ºÇ×ÊÖдµÄ´úÂ빫²¼µ½ÍøÂçÖУ¬ÒÔ±ãÓÚ´ó¼Ò¹²Ïí¡¢½»Á÷¡£
Éæ¼°µ½µÄ֪ʶ·¶³ë£º
1. socket¸ÅÄî
2. java±à³ÌÓïÑÔ
3. Flash MX ActionScriptÖеÄXMLSocket
ÊµÊ±ÍøÂçÓÎÏ·Ò²ÊôÓÚ´óÐÍÓ¦ÓóÌÐò·¶³ë£¬Ò»¸ö¹Ø¼ü»·½Ú¾ÍÊǽ¨Á¢ÊµÊ±Ö÷¶¯Í¨ÐÅ»·¾³£¨Ïà¶ÔµÄ£¬Óиö³ÆÎª±»¶¯Í¨¡£Ðŵķ½Ê½£¬×îºÃµÄÀý×Ó¾ÍÊÇÄãÕýÔÚÓÃIEä¯ÀÀÆ÷ä¯ÀÀÒ»¸öÍøÕ¾£¬´Ëʱä¯ÀÀÆ÷ºÍ·þÎñÆ÷Ö®¼ä¾ÍÊDZ»¶¯Í¨ÐÅ·½Ê½£ºÈç¹ûÄã²»µã»÷Ò»¸öÁ¬½Ó£¬·¢ËÍÒ»¸öWEBÒ³ÃæÇëÇóµ½WEB·þÎñÆ÷£¬WEB·þÎñÆ÷ÊDz»»áÖ÷¶¯ÏòÄãµÄä¯ÀÀÆ÷·¢ËÍÈκÎÒ³ÃæµÄ£©¡£ÔÚ´ËSocekt API¾Í³ÉΪÁËÊ×Ñ¡¡£ÏÞÓÚÆª·ù£¬ÕâÀï²»ÔÙ¹ý¶à½âÊÍsocketµÄº¬Ò壬ֻϣÍû´ó¼ÒÄܼÇסһµã£¬Ö»Òª½¨Á¢Äܹ»ÊµÊ±Í¨ÐŵÄÓ¦ÓóÌÐò¾ÍÐèÒª½¨Á¢socketÁ¬½Ó¡£
¡¾¿Í»§¶ËFLASH±à³Ì²¿·Ö¡¿
´Ómx×Ô´øµÄas×ÖµäÖпÉÒÔ¿´³ö£¬FlashÔÚÍøÂçͨÐÅ·½ÃæµÃµ½Á˷dz£´óµÄ¼ÓÇ¿¡£“The XMLSocket object is useful for client-server applications that require low latency, such as real-time chat systems”×¢Òâ×îºóµÄһС¶Î»°£ºsuch as real-time chat systems£¨ÒëÎÄ£ºÀýÈçʵʱÁÄÌìϵͳ£©
ͨ¹ýµ÷ÓÃXMLSocket·½·¨FLASH¾Í¿ÉÒÔºÍһЩÓÉÇ¿´óÓïÑÔ±àдµÄ·þÎñÆ÷Ó¦ÓóÌÐò½øÐÐͨÐÅ£¬½ø¶ø¿ª·¢³ö¸÷ÖÖʵʱÐÅÏ¢½»Á÷ϵͳ¡£ËùÒÔÎÒÃǵÄÄ¿±êËø¶¨ÔÚXMLSocket£¡
ÁíÍâÖµµÃ×¢ÒâµÄÊÇ£ºÓкܶàÈËÒ»¿´µ½XMLSocketÇ°ÃæµÄXMLÈý¸ö×Öĸ£¬¾Í¾õµÃÍ·ÌÛ£¬ÒÔΪ±ØÐëÏÈÊìϤÉõÖÁ¾«Í¨XML²ÅÄÜʹÓÃÕâ¸ö¶ÔÏó¼°Æä·½·¨£¬µ«ÎÒҪ˵µÄÊÇÔÚÄ㲻̫Á˽âXMLµÄ½×¶Î£¬Ö»Òª°ÑXMLÐÅÏ¢¿´³ÉÊÇÒ»¸öËæÒⳤ¶È£¨>0£©µÄ×Ö·û´®£¬°ÑXMLSocket¿´³ÉÊÇÒ»¸öÖ»ÊÇÓÃÀ´·¢ËÍ×Ö·û´®Êý¾ÝµÄ¶ÔÏó¾ÍºÃ°ì¶àÁË¡£
ÎÒÃÇ»¹ÊÇ´Ó·ÖÎö´úÂë×ÅÊÖ£¬À´¿ç½ø¿ª·¢FLASHÊµÊ±ÍøÂçÓÎÏ·µÄ´óÃŰɣº
//½¨Á¢XMLSocket¶ÔÏó
var mySocket = new XMLSocket();
mySocket.connect("12
Ïà¹ØÎĵµ£º
·´ÉäÊÇJavaÓïÑÔÖкÜÖØÒªµÄÒ»¸ö×é³É²¿·Ö£¬ËùÒԾʹ˻°ÌâÌÖÂÛµÄ×ÊÔ´¿ÉνÊýÖ®²»¾¡£¬ÈÕ³£¿ª·¢Ò²»á¾³£Ê¹Óõ½¹ØÓÚ·´ÉäµÄReflection
API¡£Java5.0
Tiger³öÏÖÒԺ󣬸ü¶Ô·´ÉäAPIÓÐÁËеÄÀ©Õ¹£¬¾¡¹ÜÌÖÂ۵ϰÌâºÜ¶à£¬²»¹ýÎÒ»¹ÊǾõµÃ²»¹»È«Ã棬ÓÈÆäÊǶԷºÐÍÕâÒ»¿é£¬ËùÒÔ¾ÍÎÒËùÖª£¬ÔÙ»¨Á¦Æø×ܽáÒ»·¬
Ê×ÏÈ·´ÉäµÄÈë¿ÚÊÇ´ÓClass¿ ......
ÏòÊý¾Ý¿â±£´æ¶ÔÏ󣬲ÉÓÃObjectOutputStreamÏòÊý¾Ý¿âÖ±½ÓдÈë
/**
* Title: AF
* Description: ÏòÊý¾Ý¿âÖÐдÈë¶ÔÏó²âÊÔ³ÌÐò
* Copyright: Copyright 2009 ufgov, Inc.
* Compan ......
Èç¹ûÒ»¸öÀà³ÉÔ±±»ÉùÃ÷Ϊstatic£¬Ëü¾ÍÄܹ»ÔÚÀàµÄÈκζÔÏó´´½¨Ö®Ç°±»·ÃÎÊ£¬¶ø²»±ØÒýÓÃÈκζÔÏó¡£static ³ÉÔ±µÄ×î³£¼ûµÄÀý×ÓÊÇmain( ) ¡£ÒòΪÔÚ³ÌÐò¿ªÊ¼Ö´ÐÐʱ±ØÐëµ÷ÓÃmain() £¬ËùÒÔËü±»ÉùÃ÷Ϊstatic¡£
ÉùÃ÷ΪstaticµÄ±äÁ¿ÊµÖÊÉϾÍÊÇÈ«¾Ö±äÁ¿¡£µ±ÉùÃ÷Ò»¸ö¶ÔÏóʱ£¬²¢²»²úÉústatic±äÁ¿µÄ¿½±´£¬¶øÊǸÃÀàËùÓеÄʵÀý±äÁ¿¹²ÓÃͬһ¸ö ......
5.ÈçºÎ´ÓJVMÖлñÈ¡ÐÅÏ¢À´½øÐе÷Õû
¡¡¡¡-verbose.gc¿ª¹Ø¿ÉÏÔʾgcµÄ²Ù×÷ÄÚÈÝ¡£´ò¿ªËü£¬¿ÉÒÔÏÔʾ×îæºÍ×î¿ÕÏÐÊÕ¼¯ÐÐΪ·¢ÉúµÄʱ¼ä¡¢ÊÕ¼¯Ç°ºóµÄÄÚ´æ´óС¡¢ÊÕ¼¯ÐèÒªµÄʱ¼äµÈ¡£´ò¿ª- xx:+ printgcdetails¿ª¹Ø£¬¿ÉÒÔÏêϸÁ˽âgcÖеı仯¡£´ò¿ª-XX: + PrintGCTimeStamps¿ª¹Ø£¬¿ÉÒÔÁ˽âÕâЩÀ¬»øÊÕ¼¯·¢ÉúµÄʱ¼ä£¬×ÔjvmÆô¶¯ÒÔºóÒÔ ......
ÏñÒÆ¶¯Íø¹ØÒ»Ñù£¬iisforwardÕâ¸öISAPI¹ýÂËÆ÷Ò²»á¶Ôrequest¶ÔÏó½øÐÐÔÙ°ü×°£¬¸½¼ÓһЩWLSÒªÓõÄÍ·ÐÅÏ¢¡£ÕâÖÖÇé¿öÏ£¬Ö±½ÓÓÃrequest.getRemoteAddr()ÊÇÎÞ·¨È¡µ½ÕæÕýµÄ¿Í»§IPµÄ¡£
ʵ¼ÊµÄiisforward¸½¼ÓÍ·ÈçÏ£º
WL-Proxy-Client-IP=211.161.1.239
Proxy-Client-IP=211.161.1.239
X-Forwarded-For=211.161.1.239
WL- ......