锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩人妻无码一区二区三区久久99,久久最新精品国产,欧美国产成人久久精品http://www.shnenglu.com/lijialian/category/1777.htmlzh-cnMon, 19 May 2008 23:00:20 GMTMon, 19 May 2008 23:00:20 GMT60TP_Reactor 瀛︿範絎旇http://www.shnenglu.com/lijialian/archive/2007/02/25/18971.html涓鍔ㄤ笉濡備竴闈?/dc:creator>涓鍔ㄤ笉濡備竴闈?/author>Sun, 25 Feb 2007 12:41:00 GMThttp://www.shnenglu.com/lijialian/archive/2007/02/25/18971.htmlhttp://www.shnenglu.com/lijialian/comments/18971.htmlhttp://www.shnenglu.com/lijialian/archive/2007/02/25/18971.html#Feedback0http://www.shnenglu.com/lijialian/comments/commentRss/18971.htmlhttp://www.shnenglu.com/lijialian/services/trackbacks/18971.html闃呰鍏ㄦ枃

]]>
select_reactor鐨勫師鐮佸涔犵瑪璁?/title><link>http://www.shnenglu.com/lijialian/archive/2007/02/24/18950.html</link><dc:creator>涓鍔ㄤ笉濡備竴闈?/dc:creator><author>涓鍔ㄤ笉濡備竴闈?/author><pubDate>Sat, 24 Feb 2007 12:30:00 GMT</pubDate><guid>http://www.shnenglu.com/lijialian/archive/2007/02/24/18950.html</guid><wfw:comment>http://www.shnenglu.com/lijialian/comments/18950.html</wfw:comment><comments>http://www.shnenglu.com/lijialian/archive/2007/02/24/18950.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lijialian/comments/commentRss/18950.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lijialian/services/trackbacks/18950.html</trackback:ping><description><![CDATA[     鎽樿: 棣栧厛浠庡畾涔変竴涓猺eactor寮濮嬨侫CE_TP_Reactor select_reactor_one(g_unOneMaxHandle, 0, 0, 0, 1); 涓婇潰鐨勮繖鍙ヨ瘽瑙﹀彂浜嗕竴涓嬬殑涓浜涜涓恒備富瑕佸氨鏄粰event_handlers_鍒嗛厤浜嗗唴瀛樸傝繖閲屽氨鍐沖畾浜嗕綘鑳芥敮鎸佸灝戞潯榪炴帴 int ACE_Select_React...  <a href='http://www.shnenglu.com/lijialian/archive/2007/02/24/18950.html'>闃呰鍏ㄦ枃</a><img src ="http://www.shnenglu.com/lijialian/aggbug/18950.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lijialian/" target="_blank">涓鍔ㄤ笉濡備竴闈?/a> 2007-02-24 20:30 <a href="http://www.shnenglu.com/lijialian/archive/2007/02/24/18950.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>N涓猂eactor鏄惁灝辨剰鍛崇潃鏀寔N*FD_SETSIZE涓繛鎺ュ憿錛?/title><link>http://www.shnenglu.com/lijialian/archive/2007/02/22/18917.html</link><dc:creator>涓鍔ㄤ笉濡備竴闈?/dc:creator><author>涓鍔ㄤ笉濡備竴闈?/author><pubDate>Thu, 22 Feb 2007 15:25:00 GMT</pubDate><guid>http://www.shnenglu.com/lijialian/archive/2007/02/22/18917.html</guid><wfw:comment>http://www.shnenglu.com/lijialian/comments/18917.html</wfw:comment><comments>http://www.shnenglu.com/lijialian/archive/2007/02/22/18917.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lijialian/comments/commentRss/18917.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lijialian/services/trackbacks/18917.html</trackback:ping><description><![CDATA[ <p>聽</p> <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"> <img id="Codehighlighter1_0_835_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_835_Open_Text.style.display='none'; Codehighlighter1_0_835_Closed_Image.style.display='inline'; Codehighlighter1_0_835_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /> <img id="Codehighlighter1_0_835_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_0_835_Closed_Text.style.display='none'; Codehighlighter1_0_835_Open_Image.style.display='inline'; Codehighlighter1_0_835_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /> <span id="Codehighlighter1_0_835_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_0_835_Open_Text"> <span style="COLOR: #008000">/*</span> <span style="COLOR: #008000">*******************************************************************<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />*聽Copyright聽(c)聽2006,study-record聽home<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />*聽All聽rights聽reservered.<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />*<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />*聽鏂囦歡鍚嶇О聽:聽littersize.cpp聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />*聽鎽樎犅犅犅犺聽:聽榪欎釜渚嬪瓙涓昏鏄敤鏉ラ獙璇佽繖鏍蜂竴涓棶棰樸傚綋鎴戜滑紼嬪簭涓湁n涓猺eactor鐨勬椂鍊欙紝鏄惁灝辨剰鍛崇潃鎴戜滑鏀寔n*FD_SETSIZE榪炴帴.<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽涓轟簡楠岃瘉榪欎釜闂,鎴戜滑浼犻掍竴涓ぇ灝忎負2鐨勫肩粰ACE_Select_Reactor鐨勬瀯閫犲嚱鏁般傜湅鏄惁鏄彧鏀寔2涓繛鎺?<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽楠岃瘉緇撴灉琛ㄦ槑錛氬湪鏈緥瀛愪腑錛岀敱浜巃cceptor娉ㄥ唽鐢ㄦ帀浜嗕竴涓紝鑰屾垜浠粰瀹氱殑鏈澶х殑handle鏁頒負2,鎵浠ュ彧鑳芥帴鍙椾竴涓繛鎺ャ?br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽鍦ㄥ懡浠よ涓嬭緭鍏ワ細telnet聽127.0.0.1聽1234聽,鍦ㄦ垜浠浜屾杈撳叆鏃訛紝<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽鍦ㄨ皟鐢╥nt聽nRet聽=聽m_Reactor->register_handler(pEvent,聽ACE_Event_Handler::READ_MASK);鐨勬椂鍊欎竴瀹氫細澶辮觸銆?br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽浣嗘槸鍦ㄥ懡浠よ涓嬭緭鍏?telnet聽127.0.0.1聽2345聽,鍦ㄦ垜浠涓夋杈撳叆鐨勬椂鍊欙紝璋冪敤register_handler鐨勬椂鍊欐墠浼氬け璐?br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽浣嗘槸榪欐牱鐨勪竴孌典唬鐮佸瓨鍦ㄩ珮cpu鐨勯棶棰橈紝涔熷氨鏄綋鎶婂鎴風鍏寵皟鐨勬椂鍊欙紝cpu鍗犵敤鐜囦細寰堥珮?鎯蟲兂鐪嬶紝涓轟粈涔堝憿錛?br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽鏈唬鐮佸彧鏄負浜嗛獙璇佷竴浜涗笢瑗匡紝鏈夊緢澶氫笉鍚堢悊鐨勫湴鏂癸紝璇峰姟浠跨収銆?br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />*<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />*聽褰撳墠鐗堟湰聽:聽1.0<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />*聽浣溌犅犅犅犺吢?聽study-record聽聽聽2007-2-22<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />*<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />********************************************************************</span> <span style="COLOR: #008000">*/</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ace/Thread_Manager.h</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ace/Select_Reactor.h</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ace/Reactor.h</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ace/Event_Handler.h</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ace/SOCK_Acceptor.h</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ace/SOCK_Stream.h</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" />#include聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">ace/INET_Addr.h</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">const</span> <span style="COLOR: #000000">聽size_t聽g_unOneMaxHandle聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">2</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #0000ff">const</span> <span style="COLOR: #000000">聽size_t聽g_unTwoMaxhandle聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">4</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #0000ff">static</span> <span style="COLOR: #000000">聽ACE_THR_FUNC_RETURN聽event_loop_one聽(</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">arg)聽<br /><img id="Codehighlighter1_1173_1321_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1173_1321_Open_Text.style.display='none'; Codehighlighter1_1173_1321_Closed_Image.style.display='inline'; Codehighlighter1_1173_1321_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1173_1321_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1173_1321_Closed_Text.style.display='none'; Codehighlighter1_1173_1321_Open_Image.style.display='inline'; Codehighlighter1_1173_1321_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_1173_1321_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_1173_1321_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_Reactor聽</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">reacator聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽static_cast</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">ACE_Reactor聽</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000">(arg);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽reacator</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">owner(ACE_Thread::self());<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽reacator</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">run_reactor_event_loop();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">static</span> <span style="COLOR: #000000">聽ACE_THR_FUNC_RETURN聽event_loop_two聽(</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">arg)聽<br /><img id="Codehighlighter1_1378_1525_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1378_1525_Open_Text.style.display='none'; Codehighlighter1_1378_1525_Closed_Image.style.display='inline'; Codehighlighter1_1378_1525_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1378_1525_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1378_1525_Closed_Text.style.display='none'; Codehighlighter1_1378_1525_Open_Image.style.display='inline'; Codehighlighter1_1378_1525_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_1378_1525_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_1378_1525_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_Reactor聽</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">reacator聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽static_cast</span> <span style="COLOR: #000000"><</span> <span style="COLOR: #000000">ACE_Reactor聽</span> <span style="COLOR: #000000">*></span> <span style="COLOR: #000000">(arg);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽reacator</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">owner(ACE_Thread::self());<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽reacator</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">run_reactor_event_loop();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽TestHandleEvent:聽</span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">聽ACE_Event_Handler<br /><img id="Codehighlighter1_1576_2006_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1576_2006_Open_Text.style.display='none'; Codehighlighter1_1576_2006_Closed_Image.style.display='inline'; Codehighlighter1_1576_2006_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1576_2006_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1576_2006_Closed_Text.style.display='none'; Codehighlighter1_1576_2006_Open_Image.style.display='inline'; Codehighlighter1_1576_2006_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_1576_2006_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_1576_2006_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">virtual</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽handle_input聽(ACE_HANDLE聽fd聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽ACE_INVALID_HANDLE)<br /><img id="Codehighlighter1_1650_1726_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1650_1726_Open_Text.style.display='none'; Codehighlighter1_1650_1726_Closed_Image.style.display='inline'; Codehighlighter1_1650_1726_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1650_1726_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1650_1726_Closed_Text.style.display='none'; Codehighlighter1_1650_1726_Open_Image.style.display='inline'; Codehighlighter1_1650_1726_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_1650_1726_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_1650_1726_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽ACE_DEBUG((LM_DEBUG,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">TestHandleEvent::handle_input\n</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">));<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">virtual</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽handle_close聽(ACE_HANDLE聽handle,聽ACE_Reactor_Mask聽close_mask)<br /><img id="Codehighlighter1_1805_1900_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1805_1900_Open_Text.style.display='none'; Codehighlighter1_1805_1900_Closed_Image.style.display='inline'; Codehighlighter1_1805_1900_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1805_1900_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1805_1900_Closed_Text.style.display='none'; Codehighlighter1_1805_1900_Open_Image.style.display='inline'; Codehighlighter1_1805_1900_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_1805_1900_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_1805_1900_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽ACE_DEBUG((LM_DEBUG,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">TestHandleEvent::handle_close\n</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">));<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽delete聽</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_HANDLE聽get_handle(</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">)聽</span> <span style="COLOR: #0000ff">const</span> <span style="COLOR: #000000">聽<br /><img id="Codehighlighter1_1940_1971_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1940_1971_Open_Text.style.display='none'; Codehighlighter1_1940_1971_Closed_Image.style.display='inline'; Codehighlighter1_1940_1971_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1940_1971_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1940_1971_Closed_Text.style.display='none'; Codehighlighter1_1940_1971_Open_Image.style.display='inline'; Codehighlighter1_1940_1971_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_1940_1971_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_1940_1971_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽peer.get_handle();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /> </span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_SOCK_Stream聽peer;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000">聽TestAcceptor聽:聽</span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">聽ACE_Event_Handler<br /><img id="Codehighlighter1_2055_2943_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2055_2943_Open_Text.style.display='none'; Codehighlighter1_2055_2943_Closed_Image.style.display='inline'; Codehighlighter1_2055_2943_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_2055_2943_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2055_2943_Closed_Text.style.display='none'; Codehighlighter1_2055_2943_Open_Image.style.display='inline'; Codehighlighter1_2055_2943_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_2055_2943_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_2055_2943_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /></span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">virtual</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽handle_input聽(ACE_HANDLE聽fd聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽ACE_INVALID_HANDLE)<br /><img id="Codehighlighter1_2129_2372_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2129_2372_Open_Text.style.display='none'; Codehighlighter1_2129_2372_Closed_Image.style.display='inline'; Codehighlighter1_2129_2372_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2129_2372_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2129_2372_Closed_Text.style.display='none'; Codehighlighter1_2129_2372_Open_Image.style.display='inline'; Codehighlighter1_2129_2372_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_2129_2372_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_2129_2372_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽TestHandleEvent</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">聽pEvent聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">new</span> <span style="COLOR: #000000">聽TestHandleEvent;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽acceptor.accept(pEvent</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">peer);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽nRet聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽m_Reactor</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">register_handler(pEvent,聽ACE_Event_Handler::READ_MASK);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">if</span> <span style="COLOR: #000000">聽(</span> <span style="COLOR: #000000">-</span> <span style="COLOR: #000000">1</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">==</span> <span style="COLOR: #000000">聽nRet)<br /><img id="Codehighlighter1_2316_2356_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2316_2356_Open_Text.style.display='none'; Codehighlighter1_2316_2356_Closed_Image.style.display='inline'; Codehighlighter1_2316_2356_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2316_2356_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2316_2356_Closed_Text.style.display='none'; Codehighlighter1_2316_2356_Open_Image.style.display='inline'; Codehighlighter1_2316_2356_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span id="Codehighlighter1_2316_2356_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_2316_2356_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽delete聽pEvent;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽聽聽聽聽pEvent聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽NULL;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">virtual</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽handle_close聽(ACE_HANDLE聽handle,聽ACE_Reactor_Mask聽close_mask)<br /><img id="Codehighlighter1_2451_2561_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2451_2561_Open_Text.style.display='none'; Codehighlighter1_2451_2561_Closed_Image.style.display='inline'; Codehighlighter1_2451_2561_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2451_2561_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2451_2561_Closed_Text.style.display='none'; Codehighlighter1_2451_2561_Open_Image.style.display='inline'; Codehighlighter1_2451_2561_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_2451_2561_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_2451_2561_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽ACE_DEBUG((LM_DEBUG,聽</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">TestAcceptor::handle_close\n</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">));<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽acceptor.close();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽delete聽</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽TestAcceptor(ACE_Reactor</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">聽reactor):m_Reactor(reactor)<br /><img id="Codehighlighter1_2624_2630_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2624_2630_Open_Text.style.display='none'; Codehighlighter1_2624_2630_Closed_Image.style.display='inline'; Codehighlighter1_2624_2630_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2624_2630_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2624_2630_Closed_Text.style.display='none'; Codehighlighter1_2624_2630_Open_Image.style.display='inline'; Codehighlighter1_2624_2630_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_2624_2630_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_2624_2630_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽open(unsigned聽</span> <span style="COLOR: #0000ff">short</span> <span style="COLOR: #000000">聽usport)<br /><img id="Codehighlighter1_2667_2800_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2667_2800_Open_Text.style.display='none'; Codehighlighter1_2667_2800_Closed_Image.style.display='inline'; Codehighlighter1_2667_2800_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2667_2800_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2667_2800_Closed_Text.style.display='none'; Codehighlighter1_2667_2800_Open_Image.style.display='inline'; Codehighlighter1_2667_2800_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_2667_2800_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_2667_2800_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽ACE_INET_Addr聽addr(usport);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽acceptor.open(addr);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽m_Reactor</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">register_handler(</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">,聽ACE_Event_Handler::ACCEPT_MASK);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_HANDLE聽get_handle(</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000">)聽</span> <span style="COLOR: #0000ff">const</span> <span style="COLOR: #000000">聽<br /><img id="Codehighlighter1_2840_2878_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2840_2878_Open_Text.style.display='none'; Codehighlighter1_2840_2878_Closed_Image.style.display='inline'; Codehighlighter1_2840_2878_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_2840_2878_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2840_2878_Closed_Text.style.display='none'; Codehighlighter1_2840_2878_Open_Image.style.display='inline'; Codehighlighter1_2840_2878_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span> <span id="Codehighlighter1_2840_2878_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_2840_2878_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽acceptor.get_handle();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span> </span> <span style="COLOR: #000000"> <br /> <img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /> </span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_SOCK_Acceptor聽acceptor;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_Reactor</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">聽m_Reactor;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" /></span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽main聽(</span> <span style="COLOR: #0000ff">int</span> <span style="COLOR: #000000">聽argc,聽</span> <span style="COLOR: #0000ff">char</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">argv[])<br /><img id="Codehighlighter1_2982_3593_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2982_3593_Open_Text.style.display='none'; Codehighlighter1_2982_3593_Closed_Image.style.display='inline'; Codehighlighter1_2982_3593_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_2982_3593_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2982_3593_Closed_Text.style.display='none'; Codehighlighter1_2982_3593_Open_Image.style.display='inline'; Codehighlighter1_2982_3593_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span> <span id="Codehighlighter1_2982_3593_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 src="http://www.shnenglu.com/images/dot.gif" /> </span> <span id="Codehighlighter1_2982_3593_Open_Text"> <span style="COLOR: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_Select_Reactor聽select_reactor_one(g_unOneMaxHandle,聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">1</span> <span style="COLOR: #000000">);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_Reactor</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">聽reactor_one聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">new</span> <span style="COLOR: #000000">聽ACE_Reactor(</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">select_reactor_one);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_Select_Reactor聽select_reactor_two(g_unTwoMaxhandle,聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">0</span> <span style="COLOR: #000000">,聽</span> <span style="COLOR: #000000">1</span> <span style="COLOR: #000000">);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_Reactor</span> <span style="COLOR: #000000">*</span> <span style="COLOR: #000000">聽reactor_two聽</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">聽</span> <span style="COLOR: #0000ff">new</span> <span style="COLOR: #000000">聽ACE_Reactor(</span> <span style="COLOR: #000000">&</span> <span style="COLOR: #000000">select_reactor_two);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽TestAcceptor聽test_acceptor(reactor_one);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽test_acceptor.open(</span> <span style="COLOR: #000000">1234</span> <span style="COLOR: #000000">);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽TestAcceptor聽test_acceptorw(reactor_two);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽test_acceptorw.open(</span> <span style="COLOR: #000000">2345</span> <span style="COLOR: #000000">);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_Thread_Manager::instance()</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">spawn(event_loop_one,聽reactor_one);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽ACE_Thread_Manager::instance()</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">spawn(event_loop_two,聽reactor_two);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff">return</span> <span style="COLOR: #000000">聽ACE_Thread_Manager::instance()</span> <span style="COLOR: #000000">-></span> <span style="COLOR: #000000">wait();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> </div> <img src ="http://www.shnenglu.com/lijialian/aggbug/18917.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lijialian/" target="_blank">涓鍔ㄤ笉濡備竴闈?/a> 2007-02-22 23:25 <a href="http://www.shnenglu.com/lijialian/archive/2007/02/22/18917.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>寮傛I/Ohttp://www.shnenglu.com/lijialian/archive/2006/10/07/13410.html涓鍔ㄤ笉濡備竴闈?/dc:creator>涓鍔ㄤ笉濡備竴闈?/author>Sat, 07 Oct 2006 05:57:00 GMThttp://www.shnenglu.com/lijialian/archive/2006/10/07/13410.htmlhttp://www.shnenglu.com/lijialian/comments/13410.htmlhttp://www.shnenglu.com/lijialian/archive/2006/10/07/13410.html#Feedback0http://www.shnenglu.com/lijialian/comments/commentRss/13410.htmlhttp://www.shnenglu.com/lijialian/services/trackbacks/13410.html
璧勬簮錛歨ttp://www.zahui.com/html/9/35437.htm

]]>
鍏充簬ACE_TP_Reactorhttp://www.shnenglu.com/lijialian/archive/2006/10/07/13408.html涓鍔ㄤ笉濡備竴闈?/dc:creator>涓鍔ㄤ笉濡備竴闈?/author>Sat, 07 Oct 2006 03:29:00 GMThttp://www.shnenglu.com/lijialian/archive/2006/10/07/13408.htmlhttp://www.shnenglu.com/lijialian/comments/13408.htmlhttp://www.shnenglu.com/lijialian/archive/2006/10/07/13408.html#Feedback0http://www.shnenglu.com/lijialian/comments/commentRss/13408.htmlhttp://www.shnenglu.com/lijialian/services/trackbacks/13408.html
鍦ˋddison-Wesley - C++NetworkProgrammingVol2鐨?.3 The ACE_TP_Reactor Class涓湁榪欐牱鍑犲彞璇濓紝璁╂垜瓚寵凍鎯充簡涓澶┿?br />
1.Multiple threads running an ACE_TP_Reactor event loop can process events concurrently on different handles
2.They can also dispatch timeout and I/O callback methods concurrently on the same event handler
3.The only serialization in the ACE_TP_Reactor occurs when I/O events occur concurrently on the same handle
4.After a thread obtains a set of active handles from select(), the other reactor threads dispatch from that handle set instead of calling select() again

鍏跺疄涓婇潰鐨?鍙ヨ瘽涓昏琛ㄨ揪榪欐牱鐨勫嚑灞傚惈涔?br />1.騫惰澶勭悊涓嶅悓handle涓婄殑浜嬩歡
2.騫惰澶勭悊鍚屼竴event handler涓婄殑瓚呮椂鍥炶皟鍑芥暟鍜孖/O鍥炶皟鍑芥暟
3.澶氫釜綰跨▼涓茶澶勭悊鍚屼竴涓猦andle涓婄殑I/O浜嬩歡銆?br />4.铏界劧TP_Reactor鏄敤leader/follow妯″紡杞祦璋冪敤select,浣嗘槸濡傛灉涓涓猻elect()鑾峰緱浜嗗涓縺媧葷殑handle,閭d箞鍏朵粬鐨勭嚎紼嬩細鍒嗗彂榪欎簺handle 錛岃屼笉鏄幓鍐嶆璋冪敤select.
聽(榪欑偣榪樻病鏈夋兂閫氾紝涔熸病鏈夌湅瑙佹槸濡備綍瀹炵幇鐨勶紵)

鈥滃涓嚎紼嬩覆琛屽鐞嗗悓涓涓猦andle涓婄殑I/O浜嬩歡鈥?/u>
聽聽聽 聽聽 榪欎釜鏄浣曡揪鍒扮殑鍛紵ACE婧愮爜涓紝褰撳鐞咺/O浜嬩歡鐨勬椂鍊欙紝浼氬皢HANDLE鎸傝搗錛屼嬌寰椾笉鍐嶅璇?font size="3">HANDLE鍋氫簨浠朵睛鍚傛潵杈懼埌鍚屼竴涓?font size="3">handle涓?/font>鐨処/O浜嬩歡鏄澶氫釜綰跨▼涓茶鍦板鐞嗐?/span>

"騫惰澶勭悊鍚屼竴event handler涓婄殑瓚呮椂鍥炴帀鍑芥暟鍜孖/O鍥炶皟鍑芥暟"
聽聽聽 聽聽 榪欐牱濂藉儚灝辨瘮杈冮夯鐑︿簡銆傚洜涓鴻繖灝辨剰鍛崇潃TP_Reactor鍙繚璇佸悓涓涓猦andle涓嬩笉浼氭湁澶氱嚎紼嬪悓鏃惰皟鐢↖/O浜嬩歡錛屼絾鏄嵈鏈夊彲鑳藉悓鏃惰皟鐢ㄨ秴鏃跺洖璋冨嚱鏁板拰I/O鍥炶皟鍑芥暟銆傚鏋滃湪榪欎袱涓嚱鏁頒腑鏈夊鏁版嵁鐨勮闂拰鎿嶄綔錛岃繖灝辨剰鍛崇潃闇瑕佹湁閿佺殑寮曞叆銆備緥澶栵紝濡傛灉鍦ㄥ畾鏃跺櫒澶勭悊涓紝瓚呰繃瀹氭椂鐨勪簨浠墮棿闅旓紝灝變細鏈変護涓涓嚎紼嬪啀嬈¤皟鐢ㄥ畾鏃跺櫒鐨勫鐞嗗嚱鏁幫紝涓涓嬪瓙寮曞叆浜嗗緢澶氬悓姝ョ殑闂銆傚浣曡В鍐寵繖涓棶棰樺憿錛?br />
鏂規硶涓錛?br />
聽聽聽 聽聽聽 聽聽聽 鏇存敼ACE鐨勬簮鐮侊紝璞″鐞唖ocket浜嬩歡涓鏍鳳紝鍦ㄥ鐞嗗畾鏃朵簨浠剁殑鏃跺欙紝涔熸妸HANDLE鎸傝搗銆傛潵鑷猦ttp://cpunion.cnblogs.com/archive/2005/08/09/210941.html

int
ACE_TP_Reactor::handle_timer_events聽(
int&/*event_count*/,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽ACE_TP_Token_Guard聽
&guard)
{
聽聽
//聽Get聽the聽current聽time
聽聽ACE_Time_Value聽cur_time聽(this->timer_queue_->gettimeofday聽()聽+
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
this->timer_queue_->timer_skew聽());

聽聽
//聽Look聽for聽a聽node聽in聽the聽timer聽queue聽whose聽timer聽<=聽the聽present
聽聽
//聽time.
聽聽ACE_Timer_Node_Dispatch_Info聽info;

聽聽
if聽(this->timer_queue_->dispatch_info聽(cur_time,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽info))
聽聽聽聽{
聽聽聽聽聽聽聽聽
//聽********聽fixed聽by聽lijie聽***********
聽聽聽聽聽聽聽聽if聽(info.type_->get_handle聽()聽!=聽ACE_INVALID_HANDLE)
聽聽聽聽聽聽聽聽{
聽聽聽聽聽聽聽聽聽聽聽聽
if聽(this->is_suspended_i聽(info.type_->get_handle聽()))
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
return0;

聽聽聽聽聽聽聽聽聽聽聽聽
this->suspend_handler聽(info.type_->get_handle聽());
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽
//聽********聽end聽**********************

聽聽聽聽聽聽
constvoid*upcall_act聽=0;

聽聽聽聽聽聽
//聽Preinvoke.
聽聽聽聽聽聽this->timer_queue_->preinvoke聽(info,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽cur_time,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽upcall_act);

聽聽聽聽聽聽

聽聽聽聽聽聽
//聽Release聽the聽token聽before聽dispatching聽notifies
聽聽聽聽聽聽guard.release_token聽();

聽聽聽聽聽聽
//聽call聽the聽functor
聽聽聽聽聽聽this->timer_queue_->upcall聽(info,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽cur_time);

聽聽聽聽聽聽
//聽Postinvoke
聽聽聽聽聽聽this->timer_queue_->postinvoke聽(info,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽cur_time,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽upcall_act);

聽聽聽聽聽聽
//聽We聽have聽dispatched聽a聽timer
聽聽聽聽聽聽return1;
聽聽聽聽}

聽聽
return0;
}

handle_timer澶勭悊瀹屼互鍚庯紝榪斿洖浠ュ墠錛屽姞涓婅繖鍙ヨ瘽
this->reactor ()->resume_handler (this->get_handle ());

褰撶劧鍒繕浜嗕負Handler緙栧啓get_handle()鍑芥暟錛?br />
ACE_HANDLE聽Test_Handler::get_handle聽()聽const
{
聽聽聽聽
returnthis->peer聽().get_handle聽();
}


鏂規硶浜岋細
聽聽聽 聽聽 聽聽 聽聽 鍒╃敤ACE_Pipe鍜?/span>ACE_Message_Queue鎶婃墍鏈夌殑浜嬩歡閮芥帓闃熷埌鍚屼竴涓?/span>I/O HANDLE涓婂幓錛屽啀鐢?/span>ACE_TP_Reactor閫氳繃澶氫釜綰跨▼欏哄簭涓茶鍦?/u>瑙﹀彂鎴戜滑鏃х殑event_handler鏉ュ鐞嗚繖浜涘凡緇忔帓濂介槦鐨勪簨浠?/span>/娑堟伅銆傛垜姣旇緝璧炴垚鐢ㄨ繖鏍鋒柟娉曘傝鏂規硶鏉ヨ嚜錛?/span>http://blog.csdn.net/zhdaniel/archive/2006/06/29/850888.aspx
聽聽聽

聽聽聽 聽聽


鏂規硶涓夛細
聽聽聽 聽聽 聽聽 聽聽 ^_^騫茶剢灝變笉瑕佸鍚屼竴涓猠vent聽 handler娉ㄥ唽I/O浜嬩歡鍜屽叾浠栦簨浠躲?br />






]]>
鍏充簬MPC鐨勯棶棰樻敹闆?/title><link>http://www.shnenglu.com/lijialian/archive/2006/06/24/8949.html</link><dc:creator>涓鍔ㄤ笉濡備竴闈?/dc:creator><author>涓鍔ㄤ笉濡備竴闈?/author><pubDate>Sat, 24 Jun 2006 02:18:00 GMT</pubDate><guid>http://www.shnenglu.com/lijialian/archive/2006/06/24/8949.html</guid><wfw:comment>http://www.shnenglu.com/lijialian/comments/8949.html</wfw:comment><comments>http://www.shnenglu.com/lijialian/archive/2006/06/24/8949.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/lijialian/comments/commentRss/8949.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lijialian/services/trackbacks/8949.html</trackback:ping><description><![CDATA[鏉ユ簮:<br />http://www.ociweb.com/products/mpc/faq.html#006<br /><br />Q :褰撶敓鎴愬伐紼嬫枃浠跺悕縐扮殑鏃跺?鍙互鏀瑰彉宸ョ▼鏂囦歡鐨勫悕縐板悧?<br />A:褰撶敤MPC鐢熸垚宸ョ▼鏂囦歡鐨勬椂鍊?鍙互鐢?name_modifier 閫夐」鏉ヤ慨鏀瑰伐紼嬫枃浠跺悕縐?濡傛灉浣犱篃鎯充慨鏀瑰伐紼嬬殑鍚嶇О,鍙互澧炲姞-apply_project.濡備笅:<br />mwc.pl -static -type vc6 -name_modifier *_Static -apply_project<br />濡傛灉鐢ㄤ簡榪欎簺閫夐」,鎵鏈夌殑宸ヤ綔絀洪棿,宸ョ▼鏂囦歡鍜屽伐紼嬪悕閮戒互_Static緇撳熬.<br /><br />Q:鎬庢牱鐢∕PC鍦ㄦ瘡涓洰褰曠敓鎴愪竴涓伐浣滅┖闂?<br />A:褰撹繍琛宮wc.pl鐨勬椂鍊欏姞涓?hierarchy閫夐」.瀵逛簬鎵鏈夊熀浜?make'鐨勫伐浣滅┖闂存槸榛樿鐨?<br /><br />Q:鎬庢牱鍛婅瘔MPC鍦ㄥ鎵緈wc鍜宮pc鏂囦歡鏃?涓嶈瀵繪壘鏌愪釜鐗規畩鐨勮礬寰?<br />A:-exclude鍙互鐢ㄤ簬榪欎釜鐩殑.浣嗘槸榪欎釜璺緞蹇呴』鏄竴涓浉瀵逛簬MPC榪愯鐨勮礬寰?濡?<br />mwc.pl -exclude this_dir,this_dir_too,and_another_dir<br /><br />Q:鎬庢牱鍦ㄦ垜鐨勫伐浣滅┖闂翠腑鐢?value_template<br />A:鍦╩wc鏂囦歡涓?浣犺兘鐢ㄥ緢澶歮wc.pl鐨勫懡浠よ閫夐」.瑕佸姞涓奵mdline鍏抽敭瀛?濡傛灉鍦ㄥ懡浠よ涓渶瑕佹湁絀烘牸,蹇呴』鍖呭惈鍦?"涔嬩腑.濡?<br />workspace {<br />聽 // Set the command line value to change the configurations with vc6, vc71 and vc8<br />聽 cmdline += -value_template "configurations='MFC Release' 'MFC Debug'"<br />}<br /><br />Q:鏈夋病鏈夊姙娉曞湪Solaris,宸ョ▼涓寘鍚竴涓枃浠?浣嗘槸鍦↙inux涓婁笉鍖呭惈璇ユ枃浠跺憿?<br />A:浣犲彲浠ョ敤feature瀹氫箟涓涓猙ase宸ョ▼.濡備笅:<br />// config/default.features<br />solaris_only = 0<br /><br /><br />// some_base.mpb<br />feature(solaris_only) {<br />聽 Source_Files {<br />聽聽聽 source1.cpp <br />聽聽聽 source2.cpp <br />聽 }<br />}聽 <br /><br /><br />// your_project.mpc<br />project: some_base {<br />聽 Source_Files {<br />聽聽聽 source3.cpp <br />聽聽聽 source4.cpp <br />聽 }<br />}聽 <br /><br />Q:鍙笉鍙互涓浜涢夐」鐢ㄤ簬鏌愬鎴鋒枃浠?鑰屽彟澶栦竴浜涚敤浜庡叾浠栫殑瀹㈡埛鏂囦歡鍛?<br />A:浣犲彲浠ヤ負鐢ㄦ埛鐨勮緭鍏ユ枃浠跺垱寤哄涓儴鍒?濡備笅:<br /><pre>project: foo {<br /> FOO_Files { <br /> foo.file <br /> }<br /><br /> FOO_Files {<br /> commandflags += -QR<br /> bar.file<br /> }<br />} </pre>Q:鏈夋病鏈夊姙娉曡〃鏄庣紪璇戦夐」?<br />A:鍙互鐢?specific' .濡?<br />project {<br /><br />聽 specific(make) {<br />聽聽聽 compile_flags += -fcheck-new<br />聽 }<br /><br />聽 specific(vc71) {<br />聽聽聽 compile_flags += /wd4103<br />聽 }<br />}聽 <br /><br />Q:鍦ㄤ竴涓伐浣滅┖闂翠腑,鎯蟲湁闈欐佸拰鍔ㄦ佺殑宸ョ▼?<br />A:鍦╩wc鏂囦歡涓?寤虹珛涓涓煙鑼冨洿.澧炲姞-static鍒板懡浠よ閫夐」.濡?<br />workspace {<br />聽 // These projects will be static<br />聽 some_scope_name {<br />聽聽聽 cmdline += -static<br />聽聽聽 my_projects_dir聽聽 <br />聽聽聽 my_other_projects_dir<br />聽 }<br /><br />聽 // Anything outside the scope will have the command line options provided at the start of mwc.pl<br />聽 another_dir<br />}<br /><br />Q:鏈夋病鏈夋柟娉曞湪mpc鏂囦歡涓〃鏄庤繖涓簱蹇呴』鏄潤鎬佸簱,鍏朵粬鐨勫簱涓嶈兘鎶婂畠鐢ㄥ仛鍔ㄦ佸簱?<br />A:璁劇疆闈欐佸簱鍚?鑰屽姩鎬佸簱鍚嶄負絀?<br />project {<br />聽 sharedname =<br />聽 staticname = foo<br />}<br /><br />Q:MPC娣誨姞d.lib鍒版墍鏈夌殑搴?鏈夋病鏈夊姙娉曞叧鎺夊畠?<br />A:鍦╩pc鏂囦歡涓敤'lit_libs'浠f浛libs<br /><br />Q:涓簐c6鍜寁c71鐢熸垚闈欐佸伐紼?鍙槸鍗存病鏈夊伐紼嬬殑渚濊禆?<br />A:鍙互閫氳繃璁劇疆MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY鐜鍙橀噺,寮鴻揩MPC鐢熸垚宸ョ▼闂寸浉浜掍緷璧栫殑鐨勯潤鎬佸簱.<br /><br />Q:鏈夋病鏈夋柟娉曞彲浠ュ己鍒跺湪闈欐佸簱鍚嶅悗鏈?s'浣嗘槸debug鐗堟湰娌℃湁'd'<br />A:鏄殑,浣犺兘璁劇疆lib_modifier,鐢ㄨ繖涓厤緗駭浣嶅煙淇敼鍣?鍦ㄤ笅闈㈢殑渚嬪瓙涓?鍋囪-static閫夐」宸茬粡浼犻掔粰浜哅PC<br />project {<br />聽 // Override the values of 's' and 'sd' respectively.<br />聽 specific {<br />聽聽聽 Release::lib_modifier =<br />聽聽聽 Debug::lib_modifier = d<br />聽 }<br />}聽 <br /><br />Q:鐢盡PC鐢熸垚鐨刅C71宸ョ▼,鐢╮elease ,鐢熸垚鐨勬墽琛屾枃浠跺湪release鐩綍涓?鑰宒ebug鏄湪"."鐩綍涓?鎬庢牱鎵嶈兘鎶婃墽琛屾枃浠舵斁鍦╠ebug鐩綍涓? 聽聽聽 <br />A: 澧炲姞鏀硅鍒癕PC宸ョ▼涓?br />project {聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <br />聽 specific(nmake, vc6, vc7, vc71, vc8) {<br />聽聽聽 Debug::install = Debug<br />聽 }<br />}<br /><br />Q:濡備綍鐢熸垚鏀寔MFC鐨勭増鏈?br />A:MPC鐨勫懡浠よ澧炲姞涓嬮潰涓琛?br />-value_template "configurations='MFC Release' 'MFC Debug'"<br />榪欎釜鍙互鐢ㄤ簬 em3, nmake, vc6, vc7, vc71 鍜?vc8 宸ョ▼綾誨瀷鐨勯厤緗?br />鎻愰啋涓涓嬶紝鍒繕浜嗗垱寤篶onfig.h鏂囦歡錛屽唴瀹圭被浼煎涓嬶細<br />#include "config-win32.h"<br />#include "config-win32-msvc-7.h"<br /><br /><br /><br /><img src ="http://www.shnenglu.com/lijialian/aggbug/8949.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lijialian/" target="_blank">涓鍔ㄤ笉濡備竴闈?/a> 2006-06-24 10:18 <a href="http://www.shnenglu.com/lijialian/archive/2006/06/24/8949.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>緗戠粶緙栫▼鍗? ACE_WFMO_Reactor鐨勫茍鍙戣冭檻http://www.shnenglu.com/lijialian/archive/2006/06/23/8906.html涓鍔ㄤ笉濡備竴闈?/dc:creator>涓鍔ㄤ笉濡備竴闈?/author>Fri, 23 Jun 2006 12:48:00 GMThttp://www.shnenglu.com/lijialian/archive/2006/06/23/8906.htmlhttp://www.shnenglu.com/lijialian/comments/8906.htmlhttp://www.shnenglu.com/lijialian/archive/2006/06/23/8906.html#Feedback0http://www.shnenglu.com/lijialian/comments/commentRss/8906.htmlhttp://www.shnenglu.com/lijialian/services/trackbacks/8906.html
  • 娉ㄥ唽鏀瑰彉鐨勫崗璋?宸叉敞鍐屽彞鏌勯泦鍚堢殑姣忎竴涓敼鍙?灝嗕細褰卞搷鍒版墍鏈夋墽琛屼簨浠跺驚鐜殑綰跨▼.鍦ㄦ病鏈夊悓姝ョ殑鎯呭喌涓嬪厑璁歌繖浜涙敼鍙樼殑鍙戠敓,浼氬鑷翠涪澶變簨浠?鎴栦笉姝g‘,涓嶅悎娉曠殑鍙ユ焺琚垎鍙?涓轟簡鍦ㄥ綰跨▼鐨勬儏鍐典笅,姝g‘鐨勫鐞嗘敞鍐屽彂鐢熸敼鍙樼殑鎯呭喌,ACE_WFMO_Reactor緇存寔浜嗕笁涓彞鏌勪俊鎭泦鍚堝璞?
  1. 鐢ㄤ綔浜嬩歡渚︽煡鍜屽垎鍙戠殑褰撳墠鍙ユ焺
  2. 鏂板彞鏌? 闄や簡褰撳墠鍙ユ焺闆嗗悎,鏂板彞鏌勪篃鍦ㄧ瓑寰?/li>
  3. 鎸傝搗鍙ユ焺,鏄綋鍓嶅彞鏌勪腑鎸傝搗鐨勫彞鏌?/li>
褰撻渶瑕佹敼鍙樺凡娉ㄥ唽鐨勫彞鏌勬椂,(渚嬪:娉ㄥ唽,縐婚櫎,鎸傝搗鍜屾仮澶嶄竴涓簨浠跺鐞嗗櫒),瑕佽浣忓彞鏌?浜嬩歡澶勭悊鍣?浜嬩歡綾誨瀷淇℃伅,鍜岀浉鍏充俊鎭殑璁板綍.涓嬩竴涓畬鎴恏andle_events鐨勭嚎紼嬩細娉ㄦ剰鍒拌繖涓敼鍙?鑾峰彇reactor鐨勯攣,絳夊緟鎵鏈夊叾浠栨鍦ㄨ繍琛宧andle_events鐨勭嚎紼嬪畬鎴?涓轟簡鑳借榪欎簺綰跨▼鍙婃椂鐨勫畬鎴?絳夊緟鐨勭嚎紼嬪彂閫佷竴涓唴閮ㄤ簨浠?璇ュ唴閮ㄤ簨浠舵槸鍒嗗彂鍙ユ焺闆嗗悎鐨勪竴閮ㄥ垎.鍞ら啋鎵鏈夐樆濉炲湪WaitForMultipleObjects鐨勭嚎紼?榪欎釜鏃跺?鎵鏈夌殑浜嬩歡澶勭悊綰跨▼灝嗕細闃誨鍦ㄧ瓑寰呭彉鍖栫殑鍙戠敓.褰撳師濮嬬殑綰跨▼瀹屾垚蹇呰鐨勪俊鎭拰鍙ユ焺鏀瑰彉鍚?閲婃斁reactor鐨勯攣.鎵鏈夌殑浜嬩歡澶勭悊綰跨▼閲嶆柊寮濮嬪湪鏇存柊鍚庣殑鍙ユ焺闆嗗悎涓婅繘琛岀瓑寰?鍒嗙鍜屽垎鍙?
  • 鎺ㄨ繜浜嬩歡澶勭悊鍣ㄧ殑娓呴櫎.ACE_WFMO_Reactor娉ㄥ唽鏀瑰彉鐨勫歡榪熷紩鍏ヤ簡涓浜涗笌鍩轟簬select()鐨勫弽搴斿櫒鐨勪笉鍚屼箣澶?褰揾anle_*()鏂規硶榪斿洖-1鎴栬匒CE_Reactor::remove_handler()琚簨浠跺鐞嗗櫒璋冪敤鏃?瀹冩帹榪熶簨浠跺鐞嗗櫒鐨勭Щ闄ゅ拰handle_close()閽╁瓙鍑芥暟鐨勫洖璋?鐩村埌涓婇潰璇磋鐨勬敞鍐屾敼鍙樺彂鐢?鎵浠ヤ竴涓簲鐢ㄥ湪璇鋒眰ACE_WFMO_Reactor縐婚櫎涓涓簨浠跺鐞嗗櫒涔嬪悗,涓嶈兘绔嬪嵆鍒犻櫎璇ヤ簨浠跺鐞嗗櫒,鍚﹀垯reator鍚庢潵璋冪敤鐨刪andle_close()鏂規硶浼氬垎鍙戜竴涓棤鏁堢殑鎸囬拡.


]]>
ACE鐨勭浉鍏崇殑鍑犱釜緗戝潃http://www.shnenglu.com/lijialian/archive/2006/06/13/8500.html涓鍔ㄤ笉濡備竴闈?/dc:creator>涓鍔ㄤ笉濡備竴闈?/author>Tue, 13 Jun 2006 07:23:00 GMThttp://www.shnenglu.com/lijialian/archive/2006/06/13/8500.htmlhttp://www.shnenglu.com/lijialian/comments/8500.htmlhttp://www.shnenglu.com/lijialian/archive/2006/06/13/8500.html#Feedback0http://www.shnenglu.com/lijialian/comments/commentRss/8500.htmlhttp://www.shnenglu.com/lijialian/services/trackbacks/8500.html
http://www.cs.wustl.edu/~schmidt/ACE/book1/Errata.txt
http://www.cs.wustl.edu/~schmidt/ACE/book2/Errata.txt

鑻辨枃璁ㄨ緇?br />http://groups.google.com/group/comp.soft-sys.ace

http://groups.google.com/group/comp.soft-sys.ace?lnk=oa

涓枃璁ㄨ鍖?br />http://forum.huihoo.com/forumdisplay.php?fid=125

鐩稿叧鏂囨。
http://www.cs.wustl.edu/~schmidt/ACE.html

鏈夊叧mpc闂
http://www.ociweb.com/products/mpc/faq.html#021

婧愮爜涓爣璁扮殑鍚箟
http://www.stack.nl/~dimitri/doxygen/commands.html


]]>
闈為樆濉濧cceptor鐨勫姩鏈?/title><link>http://www.shnenglu.com/lijialian/archive/2006/06/12/8446.html</link><dc:creator>涓鍔ㄤ笉濡備竴闈?/dc:creator><author>涓鍔ㄤ笉濡備竴闈?/author><pubDate>Mon, 12 Jun 2006 03:18:00 GMT</pubDate><guid>http://www.shnenglu.com/lijialian/archive/2006/06/12/8446.html</guid><wfw:comment>http://www.shnenglu.com/lijialian/comments/8446.html</wfw:comment><comments>http://www.shnenglu.com/lijialian/archive/2006/06/12/8446.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lijialian/comments/commentRss/8446.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lijialian/services/trackbacks/8446.html</trackback:ping><description><![CDATA[榪欑瘒鍐呭鏉ヨ嚜c++緗戠粶緙栫▼鍗? 絎竷绔?ACE鍚屾浜嬩歡鍒嗙灝佽. <br /><br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 Sidebar 14: Motivation for Nonblocking Acceptors<br /><br />聽聽聽聽聽聽聽聽 褰撴妸涓涓狝cceptor socket浼犻掔粰select(),濡傛灉鏀跺埌涓涓摼鎺?閭d箞璇ocket琚爣璇嗕負嬋媧葷姸鎬?寰堝鏈嶅姟鍣ㄥ埄鐢ㄨ繖涓簨浠跺幓琛ㄦ槑鍙互璋冪敤accept(),涓嶄細寮曡搗闃誨.涓嶅垢鐨勬槸,鏈夋潵鑷猅CP/IP寮傛琛屼負鐨勮祫婧愮珵浜?鍦ㄥ疄闄呬腑,select()涔嬪悗灝辮〃鏄庝竴涓猘cceptor socket鏄縺媧葷殑(浣嗘槸鍦╝ccept()璋冪敤涔嬪墠),client鍙互鍏抽棴瀹冪殑榪炴帴,涓鏃ccept()闃誨娼滃湪鐨勬寕璧鋒暣涓繘紼?涓轟簡閬垮厤榪欎釜闂,<strong>acceptor socket褰撳拰select()涓璧蜂嬌鐢ㄧ殑鏃跺?搴旇涓鐩磋璁劇疆涓洪潪闃誨鐨勬ā寮?/strong>.鍦ˋCE涓?榪欐宸ヤ綔寰堟柟渚?鍙浼犻扐CE_NONBLOCK鏍囪瘑緇檈nable()鏂規硶灝卞彲浠ヤ簡.enable()鏂規硶鏄疉CE_IPC_SAP鎻愪緵鐨?鎵浠CE_SOCK_Acceptor涔熸嫢鏈?<img src ="http://www.shnenglu.com/lijialian/aggbug/8446.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lijialian/" target="_blank">涓鍔ㄤ笉濡備竴闈?/a> 2006-06-12 11:18 <a href="http://www.shnenglu.com/lijialian/archive/2006/06/12/8446.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>error LNK2019:鏃犳硶瑙f瀽鐨勫閮ㄧ鍙?/title><link>http://www.shnenglu.com/lijialian/archive/2006/06/11/8435.html</link><dc:creator>涓鍔ㄤ笉濡備竴闈?/dc:creator><author>涓鍔ㄤ笉濡備竴闈?/author><pubDate>Sun, 11 Jun 2006 15:18:00 GMT</pubDate><guid>http://www.shnenglu.com/lijialian/archive/2006/06/11/8435.html</guid><wfw:comment>http://www.shnenglu.com/lijialian/comments/8435.html</wfw:comment><comments>http://www.shnenglu.com/lijialian/archive/2006/06/11/8435.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.shnenglu.com/lijialian/comments/commentRss/8435.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lijialian/services/trackbacks/8435.html</trackback:ping><description><![CDATA[1.鏈濂藉厛鐢ˋCE鑷韓鐨勪緥瀛?嫻嬭瘯鎵緙栧簱鐨勬紜?<br />2.紜繚ACE.lib鎴朅CEd.lib鑳芥紜殑閾炬帴鍒板伐紼嬩腑.<br />3.濡傛灉鍑虹幇"__declspec(dllimport) int __cdecl ace_os_main_i"瀛楁牱鐨勯摼鎺ラ敊璇?鍙互鑰冭檻鍔犱笂#include "ace/OS_main.h"<img src ="http://www.shnenglu.com/lijialian/aggbug/8435.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lijialian/" target="_blank">涓鍔ㄤ笉濡備竴闈?/a> 2006-06-11 23:18 <a href="http://www.shnenglu.com/lijialian/archive/2006/06/11/8435.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.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.lnboxue.cn" target="_blank">狠色狠色狠狠色综合久久</a>| <a href="http://www.hhh328.cn" target="_blank">亚洲日本va中文字幕久久</a>| <a href="http://www.liuqianqian.cn" target="_blank">久久久久国产一级毛片高清版</a>| <a href="http://www.manini.cn" target="_blank">国产精品综合久久第一页 </a>| <a href="http://www.xiaominblog.cn" target="_blank">色8激情欧美成人久久综合电</a>| <a href="http://www.hxg123.cn" target="_blank">中文成人久久久久影院免费观看</a>| <a href="http://www.ywck.net.cn" target="_blank">久久久久亚洲AV成人片</a>| <a href="http://www.xmjbjd.cn" target="_blank">91麻豆国产精品91久久久</a>| <a href="http://www.yssmtm.cn" target="_blank">久久国产成人亚洲精品影院</a>| <a href="http://www.lntyzx.com.cn" target="_blank">久久99精品久久久久婷婷</a>| <a href="http://www.fxmodels.com.cn" target="_blank">久久精品国产亚洲av麻豆蜜芽</a>| <a href="http://www.cdz8.cn" target="_blank">久久这里只有精品视频99</a>| <a href="http://www.567uu.cn" target="_blank">久久国产三级无码一区二区 </a>| <a href="http://www.lovebuyhome.com.cn" target="_blank">狠狠色丁香久久综合五月</a>| <a href="http://www.xueyang.net.cn" target="_blank">国产成人精品久久综合</a>| <a href="http://www.caregps.cn" target="_blank">久久久亚洲欧洲日产国码二区</a>| <a href="http://www.cpfang.cn" target="_blank">中文精品久久久久国产网址</a>| <a href="http://www.h9iet.cn" target="_blank">91久久精一区二区三区大全</a>| <a href="http://www.lsdkgoio8843.cn" target="_blank">久久国产亚洲高清观看</a>| <a href="http://www.sj0524.cn" target="_blank">国产成人综合久久精品红</a>| <a href="http://www.hilxb.cn" target="_blank">久久精品综合一区二区三区</a>| <a href="http://www.lihengzhe.cn" target="_blank">国产V综合V亚洲欧美久久</a>| <a href="http://www.3lr9a.cn" target="_blank">久久天天躁狠狠躁夜夜2020一 </a>| <a href="http://www.pbti.com.cn" target="_blank">久久99精品国产自在现线小黄鸭</a>| <a href="http://www.jvqo.cn" target="_blank">久久这里都是精品</a>| <a href="http://www.xmxfz.cn" target="_blank">精品久久人人爽天天玩人人妻</a>| <a href="http://www.gg4493.cn" target="_blank">青青草原综合久久大伊人精品</a>| <a href="http://www.qp8978.cn" target="_blank">看久久久久久a级毛片</a>| <a href="http://www.okfupo.cn" target="_blank">蜜桃麻豆www久久</a>| <a href="http://www.epuda.cn" target="_blank">久久综合给合久久狠狠狠97色</a>| <a href="http://www.xbvz.cn" target="_blank">久久精品日日躁夜夜躁欧美</a>| <a href="http://www.bvvnm.com.cn" target="_blank">性做久久久久久免费观看</a>| <a href="http://www.yousms.cn" target="_blank">久久久久国色AV免费看图片</a>| <a href="http://www.shyk888.cn" target="_blank">国产精品激情综合久久</a>| <a href="http://www.xuwonline.cn" target="_blank">品成人欧美大片久久国产欧美...</a>| <a href="http://www.zazhui.cn" target="_blank">久久精品无码一区二区无码</a>| <a href="http://www.yywhqy.cn" target="_blank">1000部精品久久久久久久久</a>| <a href="http://www.ffsqblcj.cn" target="_blank">99久久99这里只有免费费精品</a>| <a href="http://www.xsvt.cn" target="_blank">婷婷久久久亚洲欧洲日产国码AV</a>| <a href="http://www.huiju365.cn" target="_blank">国产精品一区二区久久精品</a>| <a href="http://www.gbyu.cn" target="_blank">久久久久久久综合日本亚洲</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>