锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产成人综合,老司机亚洲精品影院无码,亚洲日本中文字幕一区二区三区http://www.tkk7.com/hankchen/category/41480.html鎶婂伐浣滃綋浜嬩笟鍋氾紝鎶婇」鐩綋浣滃搧鍋氾紒zh-cnMon, 09 Apr 2012 20:57:45 GMTMon, 09 Apr 2012 20:57:45 GMT60Netty闀胯繛鎺ョ殑浜嬩歡澶勭悊欏哄簭闂http://www.tkk7.com/hankchen/archive/2012/04/08/373572.htmlhankchenhankchenSun, 08 Apr 2012 04:32:00 GMThttp://www.tkk7.com/hankchen/archive/2012/04/08/373572.htmlhttp://www.tkk7.com/hankchen/comments/373572.htmlhttp://www.tkk7.com/hankchen/archive/2012/04/08/373572.html#Feedback0http://www.tkk7.com/hankchen/comments/commentRss/373572.htmlhttp://www.tkk7.com/hankchen/services/trackbacks/373572.html鏈榪戠殑涓涓嚎涓婇」鐩紙璁よ瘉鏈嶅姟鍣級鑰佹槸鍑虹幇鏈嶅姟寤惰繜鐨勬儏鍐點傚叿浣撶殑闂鎻忚堪錛?/p>

錛?錛夊鎴風鍙戦佷竴涓姹侫錛堥暱榪炴帴錛夛紝鍦ㄦ湇鍔″櫒绔殑涓氬姟灞傞渶瑕?0縐掍互涓婃墠鑳芥帴鏀跺埌銆?/p>

錛?錛夊鎴風鍙戦佷竴涓姹侭錛堢榪炴帴錛夛紝鍦ㄦ湇鍔″櫒绔殑涓氬姟灞傚彲浠ヨ繀閫熸帴鏀跺埌銆?/p>

浠庣幇璞″ぇ鑷寸煡閬撻棶棰樺嚭鍦ㄦ湇鍔″櫒绔殑緗戠粶鎺ユ敹灞傦紝澶ч噺閫氳繃闀胯繛鎺ュ彂閫佽繃鏉ョ殑璇鋒眰閮藉牭濉炲湪緗戠粶灞傚緱涓嶅埌澶勭悊錛堝湪緗戠粶灞傛帓闃燂紝榪樻病鍒板簲鐢ㄥ眰錛夈?/p>

錛堝弸鎯呮彁紺猴細鏈崥鏂囩珷嬈㈣繋杞澆錛屼絾璇鋒敞鏄庡嚭澶勶細hankchen錛?a href="http://www.tkk7.com/hankchen">http://www.tkk7.com/hankchen錛?/strong>

 

鍚庢潵緇忚繃鎺掓煡錛屽彂鐜版槸Netty涓殑OrderedMemoryAwareThreadPoolExecutor鍘熷洜銆傜浉鍏充唬鐮佸涓嬶細

MemoryAwareThreadPoolExecutor executor = new OrderedMemoryAwareThreadPoolExecutor(threadNums, maxChannelMemorySize,
                                                                                                        maxTotalMemorySize, keepAliveTime,
                                                                                                        TimeUnit.SECONDS);
ExecutionHandler executionHandler = new ExecutionHandler(executor);

public ChannelPipeline getPipeline() throws Exception
{
        ChannelPipeline pipeline = pipeline();
        pipeline.addLast("decoder", new AuthDecoder());
        pipeline.addLast("encoder", new AuthEncoder());
        pipeline.addLast("executor", executionHandler);
        pipeline.addLast("handler", new AuthServerHandler(commandFactory));
        return pipeline;
}

 

鍏堜粙緇嶄笅鑳屾櫙鐭ヨ瘑錛屽啀鏉ュ垎鏋愰棶棰樸?/p>

澶у閮界煡閬擄紝Netty鏄竴涓熀浜庝簨浠剁殑NIO妗嗘灦銆傚湪Netty涓紝涓鍒囩綉緇滃姩浣滈兘鏄氳繃浜嬩歡鏉ヤ紶鎾茍澶勭悊鐨勶紝渚嬪錛欳hannel璇匯丆hannel鍐欑瓑絳夈傚洖蹇嗕笅Netty鐨勬祦澶勭悊妯″瀷錛?/p>

Boss綰跨▼錛堜竴涓湇鍔″櫒绔彛瀵逛簬涓涓級---鎺ユ敹鍒板鎴風榪炴帴---鐢熸垚Channel---浜ょ粰Work綰跨▼姹狅紙澶氫釜Work綰跨▼錛夋潵澶勭悊銆?/strong>

鍏蜂綋鐨刉ork綰跨▼---璇誨畬宸叉帴鏀剁殑鏁版嵁鍒癈hannelBuffer---瑙﹀彂ChannelPipeline涓殑ChannelHandler閾炬潵澶勭悊涓氬姟閫昏緫銆?/strong>

娉ㄦ剰錛氭墽琛孋hannelHandler閾劇殑鏁翠釜榪囩▼鏄悓姝ョ殑錛屽鏋滀笟鍔¢昏緫鐨勮楁椂杈冮暱錛屼細灝嗗鑷碬ork綰跨▼闀挎椂闂磋鍗犵敤寰椾笉鍒伴噴鏀撅紝浠庤屽獎鍝嶄簡鏁翠釜鏈嶅姟鍣ㄧ殑騫跺彂澶勭悊鑳藉姏銆?/p>

鎵浠ワ紝涓轟簡鎻愰珮騫跺彂鏁幫紝涓鑸氳繃ExecutionHandler綰跨▼姹犳潵寮傛澶勭悊ChannelHandler閾撅紙worker綰跨▼鍦ㄧ粡榪嘐xecutionHandler鍚庡氨緇撴潫浜嗭紝瀹冧細琚獵hannelFactory鐨剋orker綰跨▼姹犳墍鍥炴敹錛夈傚湪Netty涓紝鍙渶瑕佸鍔犱竴琛屼唬鐮侊細

public ChannelPipeline getPipeline() {
         return Channels.pipeline(
                 new DatabaseGatewayProtocolEncoder(),
                 new DatabaseGatewayProtocolDecoder(),
                 executionHandler, // Must be shared
                 new DatabaseQueryingHandler());
}
渚嬪錛?/pre>
ExecutionHandler executionHandler = new ExecutionHandler(
             new OrderedMemoryAwareThreadPoolExecutor(16, 1048576, 1048576))

 

瀵逛簬ExecutionHandler闇瑕佺殑綰跨▼姹犳ā鍨嬶紝Netty鎻愪緵浜嗕袱縐嶅彲閫夛細

1錛?MemoryAwareThreadPoolExecutor 閫氳繃瀵圭嚎紼嬫睜鍐呭瓨鐨勪嬌鐢ㄦ帶鍒訛紝鍙帶鍒禘xecutor涓緟澶勭悊浠誨姟鐨勪笂闄愶紙瓚呰繃涓婇檺鏃訛紝鍚庣畫榪涙潵鐨勪換鍔″皢琚樆濉烇級錛屽茍鍙帶鍒跺崟涓狢hannel寰呭鐞嗕換鍔$殑涓婇檺錛岄槻姝㈠唴瀛樻孩鍑洪敊璇紱

2錛?OrderedMemoryAwareThreadPoolExecutor 鏄?MemoryAwareThreadPoolExecutor 鐨勫瓙綾匯傞櫎浜哅emoryAwareThreadPoolExecutor 鐨勫姛鑳戒箣澶栵紝瀹冭繕鍙互淇濊瘉鍚屼竴Channel涓鐞嗙殑浜嬩歡嫻佺殑欏哄簭鎬э紝榪欎富瑕佹槸鎺у埗浜嬩歡鍦ㄥ紓姝ュ鐞嗘ā寮忎笅鍙兘鍑虹幇鐨勯敊璇殑浜嬩歡欏哄簭錛屼絾瀹冨茍涓嶄繚璇佸悓涓Channel涓殑浜嬩歡閮藉湪涓涓嚎紼嬩腑鎵ц錛堥氬父涔熸病蹇呰錛夈?

渚嬪錛?pre>Thread X: --- Channel A (Event A1) --. .-- Channel B (Event B2) --- Channel B (Event B3) ---> \ / X / \ Thread Y: --- Channel B (Event B1) --' '-- Channel A (Event A2) --- Channel A (Event A3) --->

涓婂浘琛ㄨ揪鐨勬剰鎬濇湁鍑犱釜錛?

錛?錛夊鏁翠釜綰跨▼姹犺岃█錛屽鐞嗗悓涓涓狢hannel鐨勪簨浠訛紝蹇呴』鏄寜鐓ч『搴忔潵澶勭悊鐨勩備緥濡傦紝蹇呴』鍏堝鐞嗗畬Channel A (Event A1) 錛屽啀澶勭悊Channel A (Event A2)銆丆hannel A (Event A3)

錛?錛夊悓涓涓狢hannel鐨勫涓簨浠訛紝浼氬垎甯冨埌綰跨▼姹犵殑澶氫釜綰跨▼涓幓澶勭悊銆?

錛?錛変笉鍚孋hannel鐨勪簨浠跺彲浠ュ悓鏃跺鐞嗭紙鍒嗘媴鍒板涓嚎紼嬶級錛屼簰涓嶅獎鍝嶃?nbsp; 

OrderedMemoryAwareThreadPoolExecutor 鐨勮繖縐嶄簨浠跺鐞嗘湁搴忔ф槸鏈夋剰涔夌殑錛屽洜涓洪氬父鎯呭喌涓嬶紝璇鋒眰鍙戦佺甯屾湜鏈嶅姟鍣ㄨ兘澶熸寜鐓ч『搴忓鐞嗚嚜宸辯殑璇鋒眰錛岀壒鍒槸闇瑕佸嬈℃彙鎵嬬殑搴旂敤灞傚崗璁備緥濡傦細XMPP鍗忚銆?

 

鐜板湪鍥炲埌鍏蜂綋涓氬姟涓婃潵錛屾垜浠繖閲岀殑璁よ瘉鏈嶅姟涔熶嬌鐢ㄤ簡OrderedMemoryAwareThreadPoolExecutor銆傝璇佹湇鍔$殑鍏朵腑涓涓幆鑺傛槸浣跨敤闀胯繛鎺ワ紝涓嶆柇澶勭悊鏉ヨ嚜鍙﹀涓涓湇鍔″櫒鐨勮璇佽姹傘傞氫俊鐨勬暟鎹寘閮藉緢灝忥紝涓鑸兘鏄?00涓瓧鑺備互鍐呫備竴鑸儏鍐典笅錛屽鐞嗚繖涓繃紼嬪緢蹇紝鎵浠ユ病鏈変粈涔堥棶棰樸備絾鏄紝鐢變簬璁よ瘉鏈嶅姟闇瑕佽皟鐢ㄧ涓夋柟鐨勬帴鍙o紝濡傛灉絎笁鏂規帴鍙e嚭鐜板歡榪燂紝灝嗗鑷磋繖涓繃紼嬪彉鎱€備竴鏃︿竴涓簨浠跺鐞嗕笉瀹岋紝鐢變簬瑕佷繚鎸佷簨浠跺鐞嗙殑鏈夊簭鎬э紝鍏朵粬浜嬩歡灝卞叏閮ㄥ牭濉炰簡錛佽岀煭榪炴帴涔嬫墍浠ユ病鏈夐棶棰橈紝鏄洜涓虹煭榪炴帴涓涓狢hannel灝變竴涓姹傛暟鎹寘錛屽鐞嗗畬Channel灝卞叧闂簡錛屾牴鏈笉瀛樺湪欏哄簭鐨勯棶棰橈紝鎵浠ュ湪涓氬姟灞傚彲浠ヨ繀閫熸敹鍒拌姹傦紝鍙槸鐢變簬鍚屾牱鐨勫師鍥狅紙絎笁鏂規帴鍙o級錛屽鐞嗘椂闂翠細姣旇緝闀褲?

鍏跺疄錛岃璇佽繃紼嬮兘鏄嫭绔嬬殑璇鋒眰鏁版嵁鍖咃紙鍗曚釜甯愬彿錛夛紝姣忎釜璇鋒眰鏁版嵁鍖呬箣闂存槸娌℃湁浠諱綍鍏崇郴鐨勶紝淇濇寔榪欐牱鐨勯『搴忔病鏈夋剰涔夛紒

 

鏈鍚庣殑鏀硅繘鎺柦錛?

1銆佸幓鎺塐rderedMemoryAwareThreadPoolExecutor錛屾敼鐢∕emoryAwareThreadPoolExecutor銆?

2銆佸噺灝戣皟鐢ㄧ涓夋柟鎺ュ彛鐨勮秴鏃舵椂闂達紝璁╁鐞嗙嚎紼嬪敖鏃╁洖褰掔嚎紼嬫睜銆?

錛堝弸鎯呮彁紺猴細鏈崥鏂囩珷嬈㈣繋杞澆錛屼絾璇鋒敞鏄庡嚭澶勶細hankchen錛?a href="http://www.tkk7.com/hankchen">http://www.tkk7.com/hankchen錛?/strong>



hankchen 2012-04-08 12:32 鍙戣〃璇勮
]]>
浣跨敤Netty瀹炵幇閫氱敤浜岃繘鍒跺崗璁殑楂樻晥鏁版嵁浼犺緭http://www.tkk7.com/hankchen/archive/2012/02/04/369378.htmlhankchenhankchenSat, 04 Feb 2012 08:33:00 GMThttp://www.tkk7.com/hankchen/archive/2012/02/04/369378.htmlhttp://www.tkk7.com/hankchen/comments/369378.htmlhttp://www.tkk7.com/hankchen/archive/2012/02/04/369378.html#Feedback1http://www.tkk7.com/hankchen/comments/commentRss/369378.htmlhttp://www.tkk7.com/hankchen/services/trackbacks/369378.html闃呰鍏ㄦ枃

hankchen 2012-02-04 16:33 鍙戣〃璇勮
]]>
鍒╃敤httpclient妯℃嫙绔欑偣鐨勭櫥褰曞彂甯栧洖澶?/title><link>http://www.tkk7.com/hankchen/archive/2009/09/17/295398.html</link><dc:creator>hankchen</dc:creator><author>hankchen</author><pubDate>Thu, 17 Sep 2009 00:42:00 GMT</pubDate><guid>http://www.tkk7.com/hankchen/archive/2009/09/17/295398.html</guid><wfw:comment>http://www.tkk7.com/hankchen/comments/295398.html</wfw:comment><comments>http://www.tkk7.com/hankchen/archive/2009/09/17/295398.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.tkk7.com/hankchen/comments/commentRss/295398.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/hankchen/services/trackbacks/295398.html</trackback:ping><description><![CDATA[     鎽樿:    鏈枃閲囩敤 HttpClient 鏉ユā鎷熺珯鐐圭殑鐧誨綍鍙戝笘鍥炲錛屼粙緇?HttpClient 鐨勭敤娉曞拰甯歌闂鐨勮В鍐蟲柟妗堛? HttpClient 鏄?Apache Jakarta Common 涓嬬殑瀛愰」鐩紝鍙互鐢ㄦ潵鎻愪緵鏀寔 HTTP 鍗忚鐨勫鎴風緙栫▼宸ュ叿鍖咃紝妯℃嫙嫻忚鍣ㄧ殑琛屼負銆傚畠鎻愪緵浜嗗緢澶氱殑鏂規硶鏉ョ畝鍖栫綉緇滅殑璁塊棶錛岃櫧鐒跺ぇ閮ㄥ垎鐨勫姛鑳藉彲浠ヤ嬌鐢ㄨ緝搴曞眰鐨?java.net.HttpURLC...  <a href='http://www.tkk7.com/hankchen/archive/2009/09/17/295398.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/hankchen/aggbug/295398.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/hankchen/" target="_blank">hankchen</a> 2009-09-17 08:42 <a href="http://www.tkk7.com/hankchen/archive/2009/09/17/295398.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>瀹炵幇綆鍗曠殑澶氱嚎紼婬TTP鏈嶅姟鍣?/title><link>http://www.tkk7.com/hankchen/archive/2009/09/15/295130.html</link><dc:creator>hankchen</dc:creator><author>hankchen</author><pubDate>Tue, 15 Sep 2009 04:36:00 GMT</pubDate><guid>http://www.tkk7.com/hankchen/archive/2009/09/15/295130.html</guid><wfw:comment>http://www.tkk7.com/hankchen/comments/295130.html</wfw:comment><comments>http://www.tkk7.com/hankchen/archive/2009/09/15/295130.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/hankchen/comments/commentRss/295130.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/hankchen/services/trackbacks/295130.html</trackback:ping><description><![CDATA[    鏈枃瀹炵幇浜嗕竴涓?font style="background-color: #cce8cf">綆鍗曠殑澶氱嚎紼婬TTP鏈嶅姟鍣?/font>銆傛帴鏀禜TTP GET璇鋒眰錛岀劧鍚庤繑鍥炵畝鍗曠殑鏂囨湰淇℃伅銆?br />     鍚庢湡浼氫赴瀵岃繖涓湇鍔″櫒錛屽疄鐜版洿澶氱殑鍔熻兘錛屼緥濡傦細<br /> 1. 鏀寔POST鏂瑰紡鎻愪氦<br /> 2. 鏀寔浜岃繘鍒剁殑嫻佷紶閫?br /> 3. 鏀寔綰跨▼姹犲鐞?br /> 4. 閲囩敤NIO闈為樆濉炲艦寮忓疄鐜?br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #0000ff">package</span><span style="color: #000000"> thread;<br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.io.BufferedReader;<br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.io.IOException;<br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.io.InputStream;<br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.io.InputStreamReader;<br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.io.OutputStream;<br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.io.PrintWriter;<br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.net.ServerSocket;<br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.net.Socket;<br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img id="Codehighlighter1_250_324_Open_Image" onclick="this.style.display='none'; Codehighlighter1_250_324_Open_Text.style.display='none'; Codehighlighter1_250_324_Closed_Image.style.display='inline'; Codehighlighter1_250_324_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_250_324_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_250_324_Closed_Text.style.display='none'; Codehighlighter1_250_324_Open_Image.style.display='inline'; Codehighlighter1_250_324_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_250_324_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_250_324_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080">13</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /> *  Copyright (C): 2009<br /> </span><span style="color: #008080">14</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /> *  </span><span style="color: #808080">@author</span><span style="color: #008000"> 闄堟柊姹?br /> </span><span style="color: #008080">15</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /> *  Jun 27, 2009 2:39:39 PM<br /> </span><span style="color: #008080">16</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" /> </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img id="Codehighlighter1_327_401_Open_Image" onclick="this.style.display='none'; Codehighlighter1_327_401_Open_Text.style.display='none'; Codehighlighter1_327_401_Closed_Image.style.display='inline'; Codehighlighter1_327_401_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_327_401_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_327_401_Closed_Text.style.display='none'; Codehighlighter1_327_401_Open_Image.style.display='inline'; Codehighlighter1_327_401_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_327_401_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_327_401_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080">19</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /> * Threaded Network Server<br /> </span><span style="color: #008080">20</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /> * 榪欐槸涓涓畝鍗曠殑澶氱嚎紼婬TTP鏈嶅姟鍣?br /> </span><span style="color: #008080">21</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /> * 閲囩敤澶氱嚎紼嬫潵澶勭悊楂樺茍鍙戠殑鐢ㄦ埛璇鋒眰<br /> </span><span style="color: #008080">22</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" /> </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">23</span><span style="color: #000000"><img id="Codehighlighter1_427_2135_Open_Image" onclick="this.style.display='none'; Codehighlighter1_427_2135_Open_Text.style.display='none'; Codehighlighter1_427_2135_Closed_Image.style.display='inline'; Codehighlighter1_427_2135_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_427_2135_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_427_2135_Closed_Text.style.display='none'; Codehighlighter1_427_2135_Open_Image.style.display='inline'; Codehighlighter1_427_2135_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> HttpServer </span><span id="Codehighlighter1_427_2135_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_427_2135_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">24</span><span style="color: #000000"><img id="Codehighlighter1_469_789_Open_Image" onclick="this.style.display='none'; Codehighlighter1_469_789_Open_Text.style.display='none'; Codehighlighter1_469_789_Closed_Image.style.display='inline'; Codehighlighter1_469_789_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_469_789_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_469_789_Closed_Text.style.display='none'; Codehighlighter1_469_789_Open_Image.style.display='inline'; Codehighlighter1_469_789_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> main(String [] args)</span><span id="Codehighlighter1_469_789_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_469_789_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        HttpServer hs</span><span style="color: #000000">=</span><span style="color: #0000ff">new</span><span style="color: #000000"> HttpServer();<br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">int</span><span style="color: #000000"> i</span><span style="color: #000000">=</span><span style="color: #000000">1</span><span style="color: #000000">, port</span><span style="color: #000000">=</span><span style="color: #000000">8888</span><span style="color: #000000">;<br /> </span><span style="color: #008080">27</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        Socket received</span><span style="color: #000000">=</span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> </span><span style="color: #008080">28</span><span style="color: #000000"><img id="Codehighlighter1_556_737_Open_Image" onclick="this.style.display='none'; Codehighlighter1_556_737_Open_Text.style.display='none'; Codehighlighter1_556_737_Closed_Image.style.display='inline'; Codehighlighter1_556_737_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_556_737_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_556_737_Closed_Text.style.display='none'; Codehighlighter1_556_737_Open_Image.style.display='inline'; Codehighlighter1_556_737_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span><span style="color: #0000ff">try</span><span id="Codehighlighter1_556_737_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_556_737_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">29</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />            ServerSocket server</span><span style="color: #000000">=</span><span style="color: #0000ff">new</span><span style="color: #000000"> ServerSocket(port);<br /> </span><span style="color: #008080">30</span><span style="color: #000000"><img id="Codehighlighter1_619_733_Open_Image" onclick="this.style.display='none'; Codehighlighter1_619_733_Open_Text.style.display='none'; Codehighlighter1_619_733_Closed_Image.style.display='inline'; Codehighlighter1_619_733_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_619_733_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_619_733_Closed_Text.style.display='none'; Codehighlighter1_619_733_Open_Image.style.display='inline'; Codehighlighter1_619_733_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span><span style="color: #0000ff">while</span><span style="color: #000000">(</span><span style="color: #0000ff">true</span><span style="color: #000000">)</span><span id="Codehighlighter1_619_733_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_619_733_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">31</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                received</span><span style="color: #000000">=</span><span style="color: #000000">server.accept();<br /> </span><span style="color: #008080">32</span><span style="color: #000000"><img id="Codehighlighter1_673_728_Open_Image" onclick="this.style.display='none'; Codehighlighter1_673_728_Open_Text.style.display='none'; Codehighlighter1_673_728_Closed_Image.style.display='inline'; Codehighlighter1_673_728_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_673_728_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_673_728_Closed_Text.style.display='none'; Codehighlighter1_673_728_Open_Image.style.display='inline'; Codehighlighter1_673_728_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span style="color: #0000ff">if</span><span style="color: #000000">(received</span><span style="color: #000000">!=</span><span style="color: #0000ff">null</span><span style="color: #000000">)</span><span id="Codehighlighter1_673_728_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_673_728_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">33</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    hs.</span><span style="color: #0000ff">new</span><span style="color: #000000"> ProcessThread(i</span><span style="color: #000000">++</span><span style="color: #000000">,received).start();<br /> </span><span style="color: #008080">34</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">35</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">36</span><span style="color: #000000"><img id="Codehighlighter1_758_786_Open_Image" onclick="this.style.display='none'; Codehighlighter1_758_786_Open_Text.style.display='none'; Codehighlighter1_758_786_Closed_Image.style.display='inline'; Codehighlighter1_758_786_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_758_786_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_758_786_Closed_Text.style.display='none'; Codehighlighter1_758_786_Open_Image.style.display='inline'; Codehighlighter1_758_786_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        }</span></span><span style="color: #0000ff">catch</span><span style="color: #000000">(IOException e)</span><span id="Codehighlighter1_758_786_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_758_786_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">37</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />            e.printStackTrace();<br /> </span><span style="color: #008080">38</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">39</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">40</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />    <br /> </span><span style="color: #008080">41</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: #0000ff">class</span><span style="color: #000000"> ProcessThread </span><span style="color: #0000ff">extends</span><span style="color: #000000"> Thread<br /> </span><span style="color: #008080">42</span><span style="color: #000000"><img id="Codehighlighter1_830_2133_Open_Image" onclick="this.style.display='none'; Codehighlighter1_830_2133_Open_Text.style.display='none'; Codehighlighter1_830_2133_Closed_Image.style.display='inline'; Codehighlighter1_830_2133_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_830_2133_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_830_2133_Closed_Text.style.display='none'; Codehighlighter1_830_2133_Open_Image.style.display='inline'; Codehighlighter1_830_2133_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_830_2133_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_830_2133_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">43</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000"> thread_number</span><span style="color: #000000">=</span><span style="color: #000000">0</span><span style="color: #000000">;<br /> </span><span style="color: #008080">44</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">private</span><span style="color: #000000"> Socket received</span><span style="color: #000000">=</span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> </span><span style="color: #008080">45</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        <br /> </span><span style="color: #008080">46</span><span style="color: #000000"><img id="Codehighlighter1_957_1041_Open_Image" onclick="this.style.display='none'; Codehighlighter1_957_1041_Open_Text.style.display='none'; Codehighlighter1_957_1041_Closed_Image.style.display='inline'; Codehighlighter1_957_1041_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_957_1041_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_957_1041_Closed_Text.style.display='none'; Codehighlighter1_957_1041_Open_Image.style.display='inline'; Codehighlighter1_957_1041_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span><span style="color: #0000ff">public</span><span style="color: #000000"> ProcessThread(</span><span style="color: #0000ff">int</span><span style="color: #000000"> thread_number, Socket received) </span><span id="Codehighlighter1_957_1041_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_957_1041_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">47</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span><span style="color: #0000ff">super</span><span style="color: #000000">();<br /> </span><span style="color: #008080">48</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span><span style="color: #0000ff">this</span><span style="color: #000000">.thread_number </span><span style="color: #000000">=</span><span style="color: #000000"> thread_number;<br /> </span><span style="color: #008080">49</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span><span style="color: #0000ff">this</span><span style="color: #000000">.received </span><span style="color: #000000">=</span><span style="color: #000000"> received;<br /> </span><span style="color: #008080">50</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">51</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> </span><span style="color: #008080">52</span><span style="color: #000000"><img id="Codehighlighter1_1064_2130_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1064_2130_Open_Text.style.display='none'; Codehighlighter1_1064_2130_Closed_Image.style.display='inline'; Codehighlighter1_1064_2130_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1064_2130_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1064_2130_Closed_Text.style.display='none'; Codehighlighter1_1064_2130_Open_Image.style.display='inline'; Codehighlighter1_1064_2130_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> run() </span><span id="Codehighlighter1_1064_2130_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1064_2130_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">53</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />            System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">絎?/span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">thread_number</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">涓鐞嗙嚎紼嬪惎鍔ㄤ簡……</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">54</span><span style="color: #000000"><img id="Codehighlighter1_1142_2126_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1142_2126_Open_Text.style.display='none'; Codehighlighter1_1142_2126_Closed_Image.style.display='inline'; Codehighlighter1_1142_2126_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1142_2126_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1142_2126_Closed_Text.style.display='none'; Codehighlighter1_1142_2126_Open_Image.style.display='inline'; Codehighlighter1_1142_2126_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span><span style="color: #0000ff">if</span><span style="color: #000000">(received</span><span style="color: #000000">!=</span><span style="color: #0000ff">null</span><span style="color: #000000">)</span><span id="Codehighlighter1_1142_2126_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1142_2126_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">55</span><span style="color: #000000"><img id="Codehighlighter1_1151_1958_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1151_1958_Open_Text.style.display='none'; Codehighlighter1_1151_1958_Closed_Image.style.display='inline'; Codehighlighter1_1151_1958_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1151_1958_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1151_1958_Closed_Text.style.display='none'; Codehighlighter1_1151_1958_Open_Image.style.display='inline'; Codehighlighter1_1151_1958_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span style="color: #0000ff">try</span><span id="Codehighlighter1_1151_1958_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1151_1958_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">56</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">榪炴帴鐢ㄦ埛鐨勫湴鍧錛?/span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">received.getInetAddress().getHostAddress());<br /> </span><span style="color: #008080">57</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    InputStream in</span><span style="color: #000000">=</span><span style="color: #000000">received.getInputStream();<br /> </span><span style="color: #008080">58</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    BufferedReader d</span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> BufferedReader(</span><span style="color: #0000ff">new</span><span style="color: #000000"> InputStreamReader(in));<br /> </span><span style="color: #008080">59</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    String result</span><span style="color: #000000">=</span><span style="color: #000000">d.readLine();<br /> </span><span style="color: #008080">60</span><span style="color: #000000"><img id="Codehighlighter1_1429_1497_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1429_1497_Open_Text.style.display='none'; Codehighlighter1_1429_1497_Closed_Image.style.display='inline'; Codehighlighter1_1429_1497_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1429_1497_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1429_1497_Closed_Text.style.display='none'; Codehighlighter1_1429_1497_Open_Image.style.display='inline'; Codehighlighter1_1429_1497_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                    </span><span style="color: #0000ff">while</span><span style="color: #000000">(result</span><span style="color: #000000">!=</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">&&</span><span style="color: #000000"> </span><span style="color: #000000">!</span><span style="color: #000000">result.equals(</span><span style="color: #000000">""</span><span style="color: #000000">))</span><span id="Codehighlighter1_1429_1497_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1429_1497_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">61</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                        System.out.println(result);<br /> </span><span style="color: #008080">62</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                        result</span><span style="color: #000000">=</span><span style="color: #000000">d.readLine();<br /> </span><span style="color: #008080">63</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">64</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    OutputStream out</span><span style="color: #000000">=</span><span style="color: #000000">received.getOutputStream();<br /> </span><span style="color: #008080">65</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    PrintWriter outstream</span><span style="color: #000000">=</span><span style="color: #0000ff">new</span><span style="color: #000000"> PrintWriter(out,</span><span style="color: #0000ff">true</span><span style="color: #000000">);<br /> </span><span style="color: #008080">66</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    String msg1</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000"><html><head><title></title></head><body><h1>鏀跺埌錛?lt;/h1></body></html></span><span style="color: #000000">"</span><span style="color: #000000">;<br /> </span><span style="color: #008080">67</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    outstream.println(</span><span style="color: #000000">"</span><span style="color: #000000">HTTP/1.0 200 OK</span><span style="color: #000000">"</span><span style="color: #000000">);</span><span style="color: #008000">//</span><span style="color: #008000">榪斿洖搴旂瓟娑堟伅,騫剁粨鏉熷簲絳?/span><span style="color: #008000"><br /> </span><span style="color: #008080">68</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #000000">                    outstream.println(</span><span style="color: #000000">"</span><span style="color: #000000">Content-Type:text/html;charset=GBK</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">69</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    outstream.println();</span><span style="color: #008000">//</span><span style="color: #008000"> 鏍規嵁 HTTP 鍗忚, 絀鴻灝嗙粨鏉熷ご淇℃伅</span><span style="color: #008000"><br /> </span><span style="color: #008080">70</span><span style="color: #008000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #000000">                    outstream.println(msg1);<br /> </span><span style="color: #008080">71</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    outstream.flush();<br /> </span><span style="color: #008080">72</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    outstream.close();<br /> </span><span style="color: #008080">73</span><span style="color: #000000"><img id="Codehighlighter1_1979_2011_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1979_2011_Open_Text.style.display='none'; Codehighlighter1_1979_2011_Closed_Image.style.display='inline'; Codehighlighter1_1979_2011_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1979_2011_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1979_2011_Closed_Text.style.display='none'; Codehighlighter1_1979_2011_Open_Image.style.display='inline'; Codehighlighter1_1979_2011_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                }</span></span><span style="color: #0000ff">catch</span><span style="color: #000000">(IOException e)</span><span id="Codehighlighter1_1979_2011_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1979_2011_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">74</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                    e.printStackTrace();<br /> </span><span style="color: #008080">75</span><span style="color: #000000"><img id="Codehighlighter1_2019_2121_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2019_2121_Open_Text.style.display='none'; Codehighlighter1_2019_2121_Closed_Image.style.display='inline'; Codehighlighter1_2019_2121_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2019_2121_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_2019_2121_Closed_Text.style.display='none'; Codehighlighter1_2019_2121_Open_Image.style.display='inline'; Codehighlighter1_2019_2121_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                }</span></span><span style="color: #0000ff">finally</span><span id="Codehighlighter1_2019_2121_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_2019_2121_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">76</span><span style="color: #000000"><img id="Codehighlighter1_2029_2060_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2029_2060_Open_Text.style.display='none'; Codehighlighter1_2029_2060_Closed_Image.style.display='inline'; Codehighlighter1_2029_2060_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2029_2060_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_2029_2060_Closed_Text.style.display='none'; Codehighlighter1_2029_2060_Open_Image.style.display='inline'; Codehighlighter1_2029_2060_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                    </span><span style="color: #0000ff">try</span><span id="Codehighlighter1_2029_2060_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_2029_2060_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">77</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                        received.close();<br /> </span><span style="color: #008080">78</span><span style="color: #000000"><img id="Codehighlighter1_2081_2115_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2081_2115_Open_Text.style.display='none'; Codehighlighter1_2081_2115_Closed_Image.style.display='inline'; Codehighlighter1_2081_2115_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2081_2115_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_2081_2115_Closed_Text.style.display='none'; Codehighlighter1_2081_2115_Open_Image.style.display='inline'; Codehighlighter1_2081_2115_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                    }</span></span><span style="color: #0000ff">catch</span><span style="color: #000000">(IOException e)</span><span id="Codehighlighter1_2081_2115_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_2081_2115_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">79</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />                        e.printStackTrace();<br /> </span><span style="color: #008080">80</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">81</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">82</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">83</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">84</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">85</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">86</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span></div> <br />     榪愯榪欎釜紼嬪簭鍚姩鏈嶅姟鍣紝鐒跺悗鍦ㄦ祻瑙堝櫒鍦板潃鏍忚緭鍏ワ細<font style="background-color: #cce8cf"><a href="http://localhost:8888/">http://localhost:8888/</a></font>錛屽嵆鍙湅鍒拌繑鍥炵粨鏋溿?br /> <br />     鍙嬫儏鎻愰啋錛氭湰鍗氭枃绔犳榪庤漿杞斤紝浣嗚娉ㄦ槑鍑哄錛?a href="http://www.tkk7.com/hankchen">闄堟柊姹?/a> <img src ="http://www.tkk7.com/hankchen/aggbug/295130.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/hankchen/" target="_blank">hankchen</a> 2009-09-15 12:36 <a href="http://www.tkk7.com/hankchen/archive/2009/09/15/295130.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://www96008.com" target="_blank">亚洲VA中文字幕无码毛片</a>| <a href="http://fantoment.com" target="_blank">国产最新凸凹视频免费</a>| <a href="http://tzntrip.com" target="_blank">久久久综合亚洲色一区二区三区 </a>| <a href="http://www-bajie.com" target="_blank">亚洲成A人片在线观看中文</a>| <a href="http://616kb.com" target="_blank">国产亚洲sss在线播放</a>| <a href="http://902578.com" target="_blank">一本岛高清v不卡免费一三区</a>| <a href="http://77tok.com" target="_blank">日韩精品亚洲人成在线观看</a>| <a href="http://c7372.com" target="_blank">亚洲AV无码精品无码麻豆</a>| <a href="http://31xyz.com" target="_blank">a级片在线免费看</a>| <a href="http://lyaa17.com" target="_blank">国产亚洲精品资在线</a>| <a href="http://jundaflex.com" target="_blank">aa级女人大片喷水视频免费 </a>| <a href="http://074g8.com" target="_blank">日本免费人成视频播放</a>| <a href="http://selaohu.com" target="_blank">精品国产亚洲一区二区三区在线观看</a>| <a href="http://tjtangpu.com" target="_blank">成人免费看片又大又黄</a>| <a href="http://yinyinai155.com" target="_blank">久久亚洲精品无码av</a>| <a href="http://bb927bb.com" target="_blank">午夜亚洲国产成人不卡在线</a>| <a href="http://liexion.com" target="_blank">男女啪啪免费体验区</a>| <a href="http://142121.com" target="_blank">亚洲人成网77777亚洲色</a>| <a href="http://bjsunic.com" target="_blank">亚洲人成色99999在线观看</a>| <a href="http://www-171234.com" target="_blank">很黄很污的网站免费</a>| <a href="http://hidiaoyan.com" target="_blank">亚洲视频日韩视频</a>| <a href="http://sznsfe.com" target="_blank">大地资源二在线观看免费高清</a>| <a href="http://3fsf.com" target="_blank">亚洲大尺度无码无码专区</a>| <a href="http://whlnrsqsie.com" target="_blank">最近免费2019中文字幕大全</a>| <a href="http://528676.com" target="_blank">亚洲av无码不卡久久</a>| <a href="http://zxzzzzx.com" target="_blank">免费在线观看日韩</a>| <a href="http://xdxsw.com" target="_blank">日本视频免费高清一本18</a>| <a href="http://www456788.com" target="_blank">亚洲人成网站在线观看播放青青 </a>| <a href="http://805ios.com" target="_blank">国产a v无码专区亚洲av</a>| <a href="http://51wdn.com" target="_blank">国产拍拍拍无码视频免费</a>| <a href="http://gedebai.com" target="_blank">亚洲国产成人精品无码一区二区 </a>| <a href="http://heifengmi.com" target="_blank">免费看污成人午夜网站</a>| <a href="http://jiggybaby.com" target="_blank">亚洲成aⅴ人片久青草影院按摩</a>| <a href="http://www454yu.com" target="_blank">亚洲精品成人网久久久久久</a>| <a href="http://fkg675.com" target="_blank">久久久精品2019免费观看</a>| <a href="http://www759696b.com" target="_blank">亚洲午夜福利在线视频</a>| <a href="http://xawsfkaisuo.com" target="_blank">美女被免费喷白浆视频</a>| <a href="http://whdysdt.com" target="_blank">日韩免费码中文在线观看</a>| <a href="http://601508.com" target="_blank">亚洲激情在线观看</a>| <a href="http://hengzekang.com" target="_blank">国产成人高清精品免费软件</a>| <a href="http://onisterwines.com" target="_blank">国产精品99久久免费观看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>