锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产三级久久久精品麻豆三级,国产成人久久精品麻豆一区,久久久久久久精品成人热色戒http://www.shnenglu.com/qinqing1984/category/10071.html鍏蟲敞錛氭搷浣滅郴緇熴佺綉緇溿佹暟鎹簱鍜屽畨鍏?/description>zh-cnFri, 22 Nov 2019 11:47:00 GMTFri, 22 Nov 2019 11:47:00 GMT60涓縐嶆墿灞昻ginx鏀寔windows鏈嶅姟鐨勬柟娉?/title><link>http://www.shnenglu.com/qinqing1984/archive/2019/11/20/216988.html</link><dc:creator>鏄ョ鍗佷簩鏈?/dc:creator><author>鏄ョ鍗佷簩鏈?/author><pubDate>Wed, 20 Nov 2019 11:45:00 GMT</pubDate><guid>http://www.shnenglu.com/qinqing1984/archive/2019/11/20/216988.html</guid><wfw:comment>http://www.shnenglu.com/qinqing1984/comments/216988.html</wfw:comment><comments>http://www.shnenglu.com/qinqing1984/archive/2019/11/20/216988.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/qinqing1984/comments/commentRss/216988.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/qinqing1984/services/trackbacks/216988.html</trackback:ping><description><![CDATA[<span style="font-size: 14pt;"><strong>鎻忚堪</strong></span><br />    nginx鏄竴嬈捐憲鍚嶇殑楂樻ц兘寮婧怶eb涓庡弽鍚戜唬鐞嗘湇鍔″櫒錛屾敮鎸亀indows鍜宭inux鎿嶄綔緋葷粺錛屽洜涓哄湪windows緋葷粺涓婅繕涓嶆敮鎸丼CM錛堟湇鍔℃帶鍒剁鐞嗭級錛屾墍浠ュ彧鑳戒互鎺у埗鍙版柟寮忚繍琛岋紝浣嗚繖鏍峰茍涓嶆槸鍦ㄥ悗鍙拌繍琛岋紝涔熶笉鑳藉湪緋葷粺鐧誨綍鍓嶅惎鍔ㄣ傞拡瀵硅繖浜涢棶棰橈紝鏈柟娉曢氳繃鏀硅繘婧愮爜錛屼嬌nginx鑹ソ鍦版敮鎸佷簡SCM錛屾柟渚夸簡閮ㄧ講榪愯<br /> <div><br /> <strong style="font-size: 14pt;">鐗圭偣</strong><br />    鏈澶у湴澶嶇敤浜唍ginx婧愮爜錛涙敮鎸丼CM錛屽茍鍏煎鎺у埗鍙拌繍琛屾柟寮忥紱緇熶竴澶勭悊寮傚父閫鍑鴻屾姤鍛婃湇鍔″仠姝?br /> </div> <strong style="font-size: 14pt;"><br /> 瀹炵幇</strong><br /><div>   <strong style="font-size: 12pt;">鍙樻崲鍘熶富鍑芥暟</strong></div> <div>      灝嗗師鏉ョ殑main鍑芥暟鏇村悕涓簄gx_main錛屽茍澧炲姞絎?涓弬鏁癷s_scm鏉ユ爣璇嗚繍琛屾柟寮忥紝闈?琛ㄧず鏈嶅姟鏂瑰紡錛?琛ㄧず鎺у埗鍙版柟寮忥紝嫻佺▼濡備笅<br />                                     <img src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/ngx_mod_old_main.png" width="303" height="679" alt="" /><br /><div>      鍥句笂綰㈣壊閮ㄥ垎涓烘彃鍏ョ殑閫昏緫錛屽叾瀹冮儴鍒嗕負nginx鍘熸潵鐨勯昏緫銆傜敱浜庢湇鍔″垵濮嬪寲欏誨皢閿欒璁板綍鍦╨og錛堟棩蹇楋級涓紝鎵浠ュ簲鍦ㄥ垵濮嬪寲log妯″潡鍚庤皟鐢?/div><br /><div><strong style="font-size: 12pt;">   澧炲姞涓誨嚱鏁?/strong></div><div>      榪欎釜涓誨嚱鏁頒篃灝辨槸紼嬪簭鍏ュ彛main錛屽彲琚帶鍒跺彴鎴朣CM璋冪敤錛屽綋琚玈CM璋冪敤鏃訛紝娉ㄥ唽鏈嶅姟浠ュ強鍚姩鏈嶅姟鎺у埗璋冨害紼嬪簭錛屾祦紼嬪涓?br />                                       <img src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/ngx_add_main.png" width="251" height="558" alt="" /><br />      濡傛灉浠ュ懡浠よ鍚姩nginx 涔熷氨鏄痬aster榪涚▼錛堢鐞嗚繘紼嬶級錛屾垨nginx浜х敓worker榪涚▼錛堝伐浣滆繘紼嬶級鏃訛紝閭d箞浠ユ帶鍒跺彴鏂瑰紡璋冪敤main錛岃繘鑰屼互is_scm涓?璋冪敤ngx_main錛屽綋ngx_main榪斿洖鏃訛紝灝辮〃紺簃aster鎴杦orker榪涚▼閫鍑轟簡   <br /><div><div><br /><strong style="font-size: 12pt;">   鏈嶅姟涓誨嚱鏁?/strong></div><div>      鐢盨CM鐢熸垚鐨勪竴涓昏緫綰跨▼璋冪敤錛屾祦紼嬪涓?br />                                         <img src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/ngx_service_main.png" width="171" height="254" alt="" /><br />      榪欓噷鐨勯昏緫綰跨▼浠f浛浜唍ginx鐨刴aster榪涚▼錛屽埌榪欓噷灝辮〃鏄庡凡緇忎互SCM鏂瑰紡榪愯浜嗭紝鎵浠ヤ互is_scm涓?璋冪敤ngx_main錛屽綋ngx_main榪斿洖鏃訛紝灝辮〃鏄巑aster榪涚▼閫鍑轟簡錛屽簲璇ユ洿鏂版湇鍔$姸鎬佷負宸插仠姝紝鐒跺悗榪斿洖琛ㄦ槑褰撳墠鏈嶅姟緇撴潫浜?br /><br /><span style="font-size: 12pt;"><strong>   鏈嶅姟鍒濆鍖?/strong></span></div><div>      鐢眓gx_main璋冪敤錛岃鍙樻崲鍘熶富鍑芥暟嫻佺▼鍥撅紝嫻佺▼濡備笅<br />                                         <img src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/ngx_service_init.png" width="180" height="245" alt="" /> <br />      鐢變簬鍦╪ginx瀹炵幇涓紝鏈夊澶勫嚭鐜板紓甯擱敊璇岀洿鎺ラ鍑猴紝鍥犳棣栧厛娉ㄥ唽浜嗚繘紼嬮鍑哄鐞嗗櫒錛屽湪鍏跺唴鎶ュ憡鏈嶅姟鐘舵佷負宸插仠姝紝榪欐牱鍙褰撹繘紼嬮鍑轟簡錛屽湪SCM涓婂氨鑳界湅鍒板凡鍋滄鐨勭姸鎬佷簡<br /><br />   <strong style="font-size: 12pt;">鏈嶅姟鎺у埗澶勭悊鍣?/strong><div>      鐢盨CM鐨勪富綰跨▼璋冪敤錛屾祦紼嬪涓?/div>                                         <img src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/ngx_service_ctrl_handler.png" width="226" height="353" alt="" /><br />   <br />   <strong style="font-size: 12pt;">璋冪敤鍏崇郴</strong><br />      涓嬪浘宸﹁竟涓簃aster榪涚▼璋冪敤妯″潡涓庡嚱鏁幫紝鍙寵竟涓簑orker榪涚▼璋冪敤妯″潡涓庡嚱鏁幫紝濮旀墭涓誨嚱鏁版槸<span style="color: red;">ngx_main</span><br />       <img src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/ngx_scm_call.png" width="717" height="459" alt="" />     </div></div></div></div><img src ="http://www.shnenglu.com/qinqing1984/aggbug/216988.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/qinqing1984/" target="_blank">鏄ョ鍗佷簩鏈?/a> 2019-11-20 19:45 <a href="http://www.shnenglu.com/qinqing1984/archive/2019/11/20/216988.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>涓縐嶇粺璁′簯鏌ヨ榛戞枃浠剁殑鏂規硶鍙婄郴緇?/title><link>http://www.shnenglu.com/qinqing1984/archive/2016/08/25/214212.html</link><dc:creator>鏄ョ鍗佷簩鏈?/dc:creator><author>鏄ョ鍗佷簩鏈?/author><pubDate>Thu, 25 Aug 2016 03:10:00 GMT</pubDate><guid>http://www.shnenglu.com/qinqing1984/archive/2016/08/25/214212.html</guid><wfw:comment>http://www.shnenglu.com/qinqing1984/comments/214212.html</wfw:comment><comments>http://www.shnenglu.com/qinqing1984/archive/2016/08/25/214212.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/qinqing1984/comments/commentRss/214212.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/qinqing1984/services/trackbacks/214212.html</trackback:ping><description><![CDATA[<strong style="font-size: 14pt;">鎻忚堪</strong><br />    浜戞煡鏉騫沖彴浠ginx浣滀負鍙嶅悜浠g悊鏈嶅姟鍣紝浣滀負瀹夊叏緇堢涓庝簯鏌ヨ鏈嶅姟鐨勬ˉ姊併傚綋瀹夊叏緇堢闇瑕佹煡璇㈤粦鏂囦歡鏃訛紝HTTP璇鋒眰鍙婂叾鍝嶅簲閮戒細緇忚繃nginx錛屼負浜嗚幏鍙栧茍緇熻涓澶?4灝忔椂鏌ヨ鐨勯粦鏂囦歡鏁伴噺錛屽氨寰楀厛鎴幏緇忚繃nginx鐨凥TTP鍝嶅簲錛屽啀鍋氭暟鎹垎鏋愩傛埅鑾稨TTP鏁版嵁嫻佹湁澶氱鏂規硶錛屼負浜嗙畝鍗曢珮鏁堬紝榪欓噷浣跨敤浜嗘寕鎺TTP榪囨護妯″潡鐨勬柟娉曪紝鍙﹀涓轟簡涓嶅獎鍝峮ginx鏈韓鐨処O澶勭悊錛屽皢HTTP鍝嶅簲瀹炰綋鍙戦佸埌鍙︿竴涓繘紼嬪嵆緇熻鏈嶅姟錛岀敱緇熻鏈嶅姟鏉ユ帴鏀跺茍鍒嗘瀽HTTP鍝嶅簲錛屾灦鏋勫涓嬪浘 <div align="center"><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/kstat_schema.png" width="599" height="289" /></div>    緇熻鏈嶅姟鐢?涓帴鏀剁嚎紼嬪拰1涓瓨鍌ㄧ嚎紼嬫瀯鎴愶紝鍏朵腑鎺ユ敹綰跨▼璐熻矗鎺ユ敹浠巒ginx榪囨護妯″潡鍙戞潵鐨凥TTP鍝嶅簲瀹炰綋錛岃В鏋愬畠騫舵彁鍙栭粦鏂囦歡MD5錛屽姞鍏ュ叡浜幆褰㈤槦鍒楋紱鑰屽瓨鍌ㄧ嚎紼嬩粠鍏變韓鐜艦闃熷垪縐誨嚭榛戞枃浠禡D5錛屾彃鍏ュ埌涓存椂鍐呭瓨鏄犲皠鏂囦歡錛屼簬姣忓ぉ瀹氭椂鍚屾鍒扮鐩樻枃浠躲?br /> <br /> <strong style="font-size: 14pt">鐗圭偣</strong><br />    榪欑鏋舵瀯鍑忓皯浜唍ginx IO寤惰繜錛屼繚璇佷簡nginx鐨勭ǔ瀹氶珮鏁堣繍琛岋紝浠庤屼笉褰卞搷鐢ㄦ埛鐨勪笟鍔¤繍琛岋紱鏈湴榪炴帴涓洪潪闃誨鐨勶紝鏀寔浜嗙粺璁℃湇鍔$殑鐙珛榪愯涓庡崌綰с?br /> <br /> <strong style="font-size: 14pt">瀹炵幇</strong><br />    <strong style="font-size: 12pt">nginx榪囨護妯″潡</strong><br />       璇ユ祦紼嬭繍琛屽湪nginx宸ヤ綔榪涚▼銆?br /> <div align="center"><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/kstat_ngxmod.png" width="279" height="802" /></div>       鐢變簬nginx閲囩敤浜嗗紓姝O鏈哄埗錛屽洜姝や粎褰撴埅鑾峰埌HTTP鍝嶅簲瀹炰綋涔熷氨鏄湁鏁版嵁緇忚繃鏃訛紝鎵嶆湁鍚庨潰鐨勬搷浣滐紱鑻ユ病鏈夋暟鎹紝鍒欎粈涔堜篃涓嶇敤鍋氥傝繖閲屾瘡嬈″彂閫佸墠鍏堝垽鏂槸鍚﹁繛鎺ヤ簡緇熻鏈嶅姟錛屾槸涓轟簡鏀寔緇熻鏈嶅姟鐨勭嫭绔嬭繍琛屼笌鍗囩駭錛屾崲鍙ヨ瘽璇達紝涓嶇緇熻鏈嶅姟鏄惁榪愯鎴栧穿婧冿紝閮戒笉褰卞搷nginx鐨勮繍琛屻?br /> <br /> <strong style="font-size: 12pt">緇熻鏈嶅姟</strong><br />    <strong>鎺ユ敹綰跨▼</strong><br />       榪欓噷鐨勬帴鏀剁嚎紼嬩篃灝辨槸涓葷嚎紼嬨?br /> <div align="center"><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/kstat_receiver.png" width="575" height="592" /></div>    <hr width="97%" />    <strong>瀛樺偍綰跨▼</strong><br />       瀛樺偍綰跨▼涓哄彟涓涓伐浣滅嚎紼嬨?br /> <div align="center"><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/kstat_storer.png" width="492" height="644" /></div>       鍚屾鏂囦歡瀹氭椂鍣ㄧ殑鏃墮棿闂撮殧瑕佹瘮鏂板緩鏂囦歡瀹氭椂鍣ㄧ殑鐭紝鐢變簬瀹氭椂鍣ㄥ埌鏈熺殑浜嬩歡澶勭悊鏄竴縐嶅紓姝ユ墽琛屾祦錛屾墍浠ュ皢瀹冧滑褰撳仛騫惰錛屼笌“浠巕澶寸Щ鍑洪粦鏂囦歡MD5”鎿嶄綔鐢誨湪浜嗗悓涓姘村鉤鏂瑰悜銆?img src ="http://www.shnenglu.com/qinqing1984/aggbug/214212.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/qinqing1984/" target="_blank">鏄ョ鍗佷簩鏈?/a> 2016-08-25 11:10 <a href="http://www.shnenglu.com/qinqing1984/archive/2016/08/25/214212.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>nginx iocp錛?錛夛細scm鏈嶅姟鎺у埗http://www.shnenglu.com/qinqing1984/archive/2016/07/12/211381.html鏄ョ鍗佷簩鏈?/dc:creator>鏄ョ鍗佷簩鏈?/author>Tue, 12 Jul 2016 07:31:00 GMThttp://www.shnenglu.com/qinqing1984/archive/2016/07/12/211381.htmlhttp://www.shnenglu.com/qinqing1984/comments/211381.htmlhttp://www.shnenglu.com/qinqing1984/archive/2016/07/12/211381.html#Feedback0http://www.shnenglu.com/qinqing1984/comments/commentRss/211381.htmlhttp://www.shnenglu.com/qinqing1984/services/trackbacks/211381.html闃呰鍏ㄦ枃

]]>
nginx iocp錛?錛夛細udp寮傛鎺ユ敹http://www.shnenglu.com/qinqing1984/archive/2015/06/25/211041.html鏄ョ鍗佷簩鏈?/dc:creator>鏄ョ鍗佷簩鏈?/author>Thu, 25 Jun 2015 09:01:00 GMThttp://www.shnenglu.com/qinqing1984/archive/2015/06/25/211041.htmlhttp://www.shnenglu.com/qinqing1984/comments/211041.htmlhttp://www.shnenglu.com/qinqing1984/archive/2015/06/25/211041.html#Feedback0http://www.shnenglu.com/qinqing1984/comments/commentRss/211041.htmlhttp://www.shnenglu.com/qinqing1984/services/trackbacks/211041.htmltcp寮傛榪炴帴鎵璁詫紝iocp闇瑕佸厛鎶曢抲dp鐨勬帴鏀舵搷浣滐紝鎵嶈兘寮曞彂鎺ユ敹瀹屾垚鐨勪簨浠訛紝鍥犳瑕佸鍩熷悕瑙f瀽鍣ㄥ拰udp寮傛鎺ユ敹浣滀簺鏀硅繘銆?br />
鍙戦佸悗鎶曢?/strong>
    dns鏌ヨ鐢眓gx_resolver_send_query鍑芥暟瀹炵幇錛屽畾涔夊湪core/ngx_resolver.c涓?
 1static ngx_int_t ngx_resolver_send_query(ngx_resolver_t *r, ngx_resolver_node_t *rn)
 2{
 3    
 4     if (rn->naddrs == (u_short) -1{
 5        n = ngx_send(uc->connection, rn->query, rn->qlen);
 6    
 7  }

 8
 9#if (NGX_HAVE_INET6)
10  if (rn->query6 && rn->naddrs6 == (u_short) -1{
11      n = ngx_send(uc->connection, rn->query6, rn->qlen);
12    
13  }

14#endif
15
16#if (NGX_WIN32) 
17    if (ngx_event_flags & NGX_USE_IOCP_EVENT){
18        uc->connection->read->ready = 1;
19        ngx_resolver_read_response(uc->connection->read);
20}

21#endif
22
23  return NGX_OK;
24}
    褰搉ginx鐢ㄤ簬浠g悊榪炴帴涓婃父鏈嶅姟鍣ㄥ墠錛岃鍏堣В鏋愬煙鍚嶏紝棣栨璋冪敤閾句負錛?span style="color: #993300;">ngx_http_upstream_init_request->ngx_resolver_name->ngx_resolver_name_locked->ngx_resolver_send_query錛涜嫢5s錛堝崟嬈¤秴鏃訛級鍚庤繕娌℃敹鍒癲ns鍝嶅簲錛屽垯鍐嶅彂閫?嬈℃煡璇紝璋冪敤閾句負錛?span style="color: #993300;">ngx_resolver_resend_handler->ngx_resolver_resend->ngx_resolver_send_query錛屽姝ゅ弽澶嶏紝鐩村埌鏀跺埌鍝嶅簲鎴?0s錛堥粯璁ゆ昏秴鏃訛級鍚庝笉鍐嶅彂閫佹煡璇€傚畠璋冪敤ngx_send鍙戦乨ns鏌ヨ錛?6琛寏21琛屼唬鐮佷負絎旇呮坊鍔狅紝ngx_resolver_read_response鍑芥暟鐢ㄤ簬鎺ユ敹騫跺垎鏋恉ns鍝嶅簲鎶ユ枃錛屽畠浼氳皟鐢ㄥ埌涓嬮潰鐨刵gx_udp_overlapped_wsarecv鍑芥暟銆?br />
寮傛鎺ユ敹
   鐢眓gx_udp_overlapped_wsarecv鍑芥暟瀹炵幇錛屽畾涔夊湪os/win32/ngx_udp_wsarecv.c涓?
 1ssize_t ngx_udp_overlapped_wsarecv(ngx_connection_t *c, u_char *buf, size_t size)
 2{
 3    int             flags, rc;
 4    WSABUF          wsabuf;
 5    ngx_err_t       err;
 6    ngx_event_t    *rev;
 7    WSAOVERLAPPED  *ovlp;
 8    u_long             bytes;
 9    
10    rev = c->read;
11    
12    if (!rev->ready) {
13      ngx_log_error(NGX_LOG_ALERT, c->log, 0"ngx_udp_overlapped_wsarecv second wsa post");
14      return NGX_AGAIN;
15  }

16    
17  if (rev->complete) {
18   if (ngx_event_flags & NGX_USE_IOCP_EVENT) {
19       if (rev->ovlp.error && rev->ovlp.error != ERROR_MORE_DATA{
20           ngx_connection_error(c, rev->ovlp.error, "ngx_udp_overlapped_wsarecv() failed");
21           return NGX_ERROR;
22       }

23   }

24   
25   rev->complete = 0;
26  }

27     
28    ovlp = NULL;
29    wsabuf.buf = (CHAR *) buf;
30    wsabuf.len = (ULONG) size;
31    flags = 0;
32    
33retry:    
34    rc = WSARecv(c->fd, &wsabuf, 1, (DWORD*)&bytes, (LPDWORD)&flags, ovlp, NULL);
35        
36    if (rc == -1{
37         rev->ready = 0;
38         err = ngx_socket_errno;
39    
40       if (err == WSA_IO_PENDING) {
41             return NGX_AGAIN;
42         }

43    
44       if (err == WSAEWOULDBLOCK) {
45           if (ngx_event_flags & NGX_USE_IOCP_EVENT) {                
46                 rev->ovlp.type = NGX_IOCP_IO;
47                 ovlp = (WSAOVERLAPPED *)&rev->ovlp;
48                 ngx_memzero(ovlp, sizeof(WSAOVERLAPPED));
49                
50                 wsabuf.buf = NULL;
51                 wsabuf.len = 0;
52                 flags = MSG_PEEK;
53                
54                goto retry;            
55            }

56            
57            return NGX_AGAIN;            
58        }

59            
60        ngx_connection_error(c, err, "ngx_udp_overlapped_wsarecv() failed");    
61        rev->error = 1;
62    
63        return NGX_ERROR;
64    }

65    
66    if ((ngx_event_flags & NGX_USE_IOCP_EVENT) && ovlp) {
67        rev->ready = 0;
68        return NGX_AGAIN;
69    }

70    
71    return bytes;
72}
   鍏堜互闈為樆濉炴柟寮忔帴鏀訛紝鑻ュ彂鐢焀SAWOULDBLOCK閿欒錛屽垯浣跨敤MSG_PEEK鏍囧織鎶曢掍竴涓?瀛楄妭鐨勯噸鍙犳帴鏀舵搷浣滐紝褰揹ns鍝嶅簲榪斿洖鏃跺彂鐢熷畬鎴愪簨浠訛紝浼氬啀嬈¤繘鍏gx_resolver_read_response鑰岃皟鐢ㄥ埌璇ュ嚱鏁幫紝姝ゆ椂rev->complete涓?錛宺ev->ovlp.error涓篍RROR_MORE_DATA錛圙etQueuedCompletionStatus榪斿洖鐨勯敊璇級錛岀敱浜庝嬌鐢ㄤ簡MSG_PEEK錛屽洜姝ゆ暟鎹繕鍦ㄦ帴鏀剁紦鍐插尯涓紝瑕佸拷鐣RROR_MORE_DATA鑰岀戶緇帴鏀訛紝榪欐椂灝辮兘鎴愬姛浜嗐備笉綆SARecv榪斿洖WSA_IO_PENDING閿欒榪樻槸鎴愬姛錛宨ocp閮戒細寰楀埌瀹屾垚閫氱煡錛屾墍浠ヨ繖閲屽綋閲嶅彔鎿嶄綔鎶曢掓垚鍔熸椂錛岃繑鍥濶GX_AGAIN錛屼究浜庡湪鍥炶皟鍐呯粺涓澶勭悊銆?img src ="http://www.shnenglu.com/qinqing1984/aggbug/211041.html" width = "1" height = "1" />

]]>
nginx iocp錛?錛夛細tcp寮傛榪炴帴http://www.shnenglu.com/qinqing1984/archive/2015/06/24/211030.html鏄ョ鍗佷簩鏈?/dc:creator>鏄ョ鍗佷簩鏈?/author>Wed, 24 Jun 2015 09:02:00 GMThttp://www.shnenglu.com/qinqing1984/archive/2015/06/24/211030.htmlhttp://www.shnenglu.com/qinqing1984/comments/211030.htmlhttp://www.shnenglu.com/qinqing1984/archive/2015/06/24/211030.html#Feedback1http://www.shnenglu.com/qinqing1984/comments/commentRss/211030.htmlhttp://www.shnenglu.com/qinqing1984/services/trackbacks/211030.htmlhttp://hg.nginx.org/nginx涓嬭澆鐨刵ginx婧愪唬鐮侊紝铏界劧瀹炵幇浜唅ocp浜嬩歡妯″潡銆佸紓姝ユ帴鍙楄繛鎺ャ侀儴鍒嗗紓姝ヨ鍐欙紝浣嗘牴鏈笉鑳芥甯稿伐浣滐紝鑰屼笖涓嶆敮鎸佸紓姝ヨ繛鎺ュ拰SCM鏈嶅姟鎺у埗錛岀瑪鑰呭湪鍙傝僺ke妯″潡鐨勫疄鐜板熀紜涓婏紝鏀硅繘鏀寔浜嗗涓嬬壒鎬э細
      1. 寮傛鎺ュ彈榪炴帴鏃剁殑璐熻澆鍧囪 
      2. 姝e弽鍚戜唬鐞嗙殑寮傛榪炴帴
      3. 寮傛鑱氬悎璇誨啓
      4. 鍩熷悕瑙f瀽鏃剁殑UDP寮傛鎺ユ敹
      5. 寮傛鏂囦歡浼犺緭
      6. SCM鏈嶅姟鎺у埗
   鐢變簬2銆?銆?鍧囦負鍘熷垱錛屽叾瀹冨嚑鐐圭殑鎬濊礬鐨嗘簮浜巗ke妯″潡鐨勫疄鐜幫紙鍙槸騫沖彴API涓嶅悓錛夛紝鍥犳鏈枃鍏堥槓榪板紓姝ヨ繛鎺ョ殑瀹炵幇銆備負浜嗗吋瀹箂elect浜嬩歡妯″潡錛屾墍鏈塱ocp鐩稿叧鐨勪唬鐮佷嬌鐢∟GX_HAVE_IOCP瀹忓拰錛堟垨錛塏GX_USE_IOCP_EVENT鏍囧織鍖呭洿錛屽叾涓璑GX_HAVE_IOCP瀹忕敤浜庢潯浠剁紪璇戯紝鍦╓IN32騫沖彴涓嬶紝瀹氫箟涓?錛涘綋閫夋嫨鐨勪簨浠舵ā鍧椾負iocp鏃訛紝鍏ㄥ眬鍙橀噺ngx_event_flags鎵嶅寘鍚玁GX_USE_IOCP_EVENT鏍囧織銆?br />
寮傛榪炴帴瀵圭
   鐢眓gx_event_connect_peer鍑芥暟錛堣繖閲岀渷鍘諱簡涓庡紓姝ヨ繛鎺ユ棤鍏崇殑浠g爜錛夊疄鐜幫紝瀹氫箟鍦╡vent/ngx_event_connect.c涓紝鍥犱負connect涓嶆敮鎸佸紓姝ヨ繛鎺ヤ簨浠剁殑瀹屾垚閫氱煡錛屾墍浠ヨ浣跨敤鎵╁睍API ConnectEx銆?nbsp;
 1ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc)
 2{
 3    int                rc;
 4    ngx_int_t          event;
 5    ngx_err_t          err;
 6    ngx_uint_t         level,family;
 7    ngx_socket_t       s;
 8    ngx_event_t       *rev, *wev;
 9    
10    s = ngx_socket(family = pc->sockaddr->sa_family, SOCK_STREAM, 0);
11              
12    #if (NGX_HAVE_IOCP)
13    if((pc->local==NULL||pc->local->sockaddr->sa_family != family) 
14        && (ngx_event_flags & NGX_USE_IOCP_EVENT)){
15        if(ngx_iocp_set_localaddr(pc->log,family,&pc->local) != NGX_OK)
16            goto failed;    
17    }

18    #endif
19       
20    
21    #if (NGX_HAVE_IOCP)
22    if(ngx_event_flags&NGX_USE_IOCP_EVENT){        
23        LPWSAOVERLAPPED   ovlp;
24        ovlp = (LPWSAOVERLAPPED)&wev->ovlp;
25        ngx_memzero(ovlp,sizeof(WSAOVERLAPPED));
26        wev->ovlp.type = NGX_IOCP_CONNECT;
27        rc = ngx_connectex(s,pc->sockaddr,pc->socklen,NULL,0,NULL,ovlp) ? 0 : -1;
28    
29    }
else
30        rc = connect(s, pc->sockaddr, pc->socklen);
31    #else
32      rc = connect(s, pc->sockaddr, pc->socklen);
33    #endif
34    
35    if (rc == -1{
36        err = ngx_socket_errno;
37        if (err != NGX_EINPROGRESS
38    #if (NGX_WIN32)
39        /* Winsock returns WSAEWOULDBLOCK (NGX_EAGAIN) */
40        && err != NGX_EAGAIN
41    #if (NGX_HAVE_IOCP)
42        && err != WSA_IO_PENDING
43    #endif
44    #endif
45            ){
46            
47            ngx_log_error(level, c->log, err, "connect() to %V failed", pc->name);
48            ngx_close_connection(c);
49            pc->connection = NULL;
50          
51            return NGX_DECLINED;
52        }

53    }

54    
55}
   璋冪敤ConnectEx鍓嶈鍏坆ind鏈湴鍦板潃錛屼笉鐒跺彂鐢焀SAEINVAL閿欒錛涚敱浜庡煙鍚嶈В鏋愬彲鑳借繑鍥濱Pv6璁板綍錛屽鑷村垱寤烘湰鍦板鎺ュ瓧鐨勫湴鍧鏃忎負AF_INET6錛屽洜姝ind鏃墮渶瑕佸尮閰岻Pv6鍦板潃錛屼笉鐒跺彂鐢焀SAEFAULT閿欒錛屽鑷磏ginx榪斿洖Internal Server Error閿欒緇欏墠绔紝鍥犳緇戝畾鍓嶈璋冪敤ngx_iocp_set_localaddr璁懼畾姝g‘鐨勬湰鍦板湴鍧錛屽綋涓斾粎褰損c->local涓虹┖鎴栧湴鍧鏃忎笉鍖歸厤鏃躲?br />
鏈湴鍒濆鍖栦笌璁懼畾
   鏀寔IPv6錛屽疄鐜板湪event/modules/ngx_iocp_module.c銆?br />    鍦板潃鍙橀噺瀹氫箟濡備笅銆?br />
1static struct sockaddr_in  sin;
2#if (NGX_HAVE_INET6)
3static struct sockaddr_in6  sin6;
4#endif
5static ngx_addr_t           local_addr;
   sin瀵瑰簲IPv4錛宻in6瀵瑰簲IPv6錛屼綔涓篵ind鐨勫鎺ュ瓧鏈湴鍦板潃銆?br />
   sin鍜宻in6鍦ㄥ惎鍔╥ocp浜嬩歡妯″潡鏃惰皟鐢╪gx_iocp_init鍒濆鍖栥?nbsp;  
 1static ngx_int_t ngx_iocp_init(ngx_cycle_t *cycle, ngx_msec_t timer)
 2{
 3    
 4  sin.sin_family = AF_INET;
 5  sin.sin_port = 0;
 6  sin.sin_addr.s_addr = INADDR_ANY;
 7    
 8#if (NGX_HAVE_INET6)
 9    sin6.sin6_family = AF_INET6;
10    sin6.sin6_port = 0;
11    sin6.sin6_addr = in6addr_any;
12#endif
13    
14  local_addr.name.len = sizeof("INADDR_ANY"- 1;
15  local_addr.name.data = (u_char *)"INADDR_ANY";    
16    
17}
   涓嶈IP鍦板潃鎴栫鍙o紝閮芥寚瀹氫負0錛岃〃紺虹敱緋葷粺鑷姩鍒嗛厤鍑哄彛IP鍦板潃鍜屾湭鍗犵敤鐨勭鍙c?br />
   鏈湴璁懼畾鐢眓gx_iocp_set_localaddr瀹炵幇銆?br />
 1ngx_int_t ngx_iocp_set_localaddr(ngx_log_t *log, in_port_t family, ngx_addr_t **local)
 2{
 3    struct sockaddr *sa;
 4    socklen_t len;
 5    
 6    if(AF_INET == family){            
 7        sa = &sin;
 8        len = sizeof(struct sockaddr_in);        
 9    }

10#if (NGX_HAVE_INET6)
11    else if(AF_INET6 == family){
12        sa = &sin6;
13        len = sizeof(struct sockaddr_in6);
14    }

15#endif
16    else{
17        ngx_log_error(NGX_LOG_ALERT, log, 0"not supported address family");
18        return NGX_ERROR;        
19    }

20
21    local_addr.sockaddr = sa;
22    local_addr.socklen = len;
23    *local = &local_addr;
24
25    return NGX_OK;
26}
   瀵逛簬闄Pv4鍜孖Pv6澶栫殑鍗忚鏃忥紝鍒欒褰曚竴涓敊璇棩蹇椼傚繀瑕佹椂涔熷彲鎵╁睍鏀寔鍏跺畠鐨勫崗璁棌錛屼緥濡侼etBIOS錛堝搴斿湴鍧鏃忎負AF_NETBIOS錛夛紝浣嗚鐪婥onnectEx鏄惁鏀寔銆?img src ="http://www.shnenglu.com/qinqing1984/aggbug/211030.html" width = "1" height = "1" />

]]>
闈㈠悜瀵硅薄閿佹鏋剁殑璁捐涓庡疄鐜?/title><link>http://www.shnenglu.com/qinqing1984/archive/2014/12/28/209327.html</link><dc:creator>鏄ョ鍗佷簩鏈?/dc:creator><author>鏄ョ鍗佷簩鏈?/author><pubDate>Sun, 28 Dec 2014 15:38:00 GMT</pubDate><guid>http://www.shnenglu.com/qinqing1984/archive/2014/12/28/209327.html</guid><wfw:comment>http://www.shnenglu.com/qinqing1984/comments/209327.html</wfw:comment><comments>http://www.shnenglu.com/qinqing1984/archive/2014/12/28/209327.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.shnenglu.com/qinqing1984/comments/commentRss/209327.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/qinqing1984/services/trackbacks/209327.html</trackback:ping><description><![CDATA[     鎽樿:    鏈枃鎻忚堪浜嗕竴縐嶇畝鍗曠殑璺ㄥ鉤鍙伴攣妗嗘灦鐨勮璁′笌瀹炵幇錛岃妗嗘灦灝忓閥瀹炵敤銆佹槗浜庢墿灞曪紝瀹冪殑鐗圭偣濡備笅錛?     ● 瀹炵幇浜嗙嚎紼嬮棿浜掓枼閿?     ● 瀹炵幇浼樺寲浜嗗崟綰跨▼鐜涓殑絀洪攣鍜岀┖綰у埆閿?     ● 鏀寔緙栬瘧鏃舵垨榪愯鏃墮夋嫨閿?  ...  <a href='http://www.shnenglu.com/qinqing1984/archive/2014/12/28/209327.html'>闃呰鍏ㄦ枃</a><img src ="http://www.shnenglu.com/qinqing1984/aggbug/209327.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/qinqing1984/" target="_blank">鏄ョ鍗佷簩鏈?/a> 2014-12-28 23:38 <a href="http://www.shnenglu.com/qinqing1984/archive/2014/12/28/209327.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍩轟簬boost asio瀹炵幇鐨剆sl socket妗嗘灦http://www.shnenglu.com/qinqing1984/archive/2013/03/20/198644.html鏄ョ鍗佷簩鏈?/dc:creator>鏄ョ鍗佷簩鏈?/author>Wed, 20 Mar 2013 12:47:00 GMThttp://www.shnenglu.com/qinqing1984/archive/2013/03/20/198644.htmlhttp://www.shnenglu.com/qinqing1984/comments/198644.htmlhttp://www.shnenglu.com/qinqing1984/archive/2013/03/20/198644.html#Feedback2http://www.shnenglu.com/qinqing1984/comments/commentRss/198644.htmlhttp://www.shnenglu.com/qinqing1984/services/trackbacks/198644.html闃呰鍏ㄦ枃

]]>
浣跨敤姝e垯琛ㄨ揪寮忚В鏋怳RLhttp://www.shnenglu.com/qinqing1984/archive/2011/11/27/161035.html鏄ョ鍗佷簩鏈?/dc:creator>鏄ョ鍗佷簩鏈?/author>Sun, 27 Nov 2011 09:22:00 GMThttp://www.shnenglu.com/qinqing1984/archive/2011/11/27/161035.htmlhttp://www.shnenglu.com/qinqing1984/comments/161035.htmlhttp://www.shnenglu.com/qinqing1984/archive/2011/11/27/161035.html#Feedback5http://www.shnenglu.com/qinqing1984/comments/commentRss/161035.htmlhttp://www.shnenglu.com/qinqing1984/services/trackbacks/161035.html
鍗忚鍚?/strong>
   鍙湁鍙棤錛屽鏋滄湁鏃跺垯鍚庨潰蹇呰窡鐫://錛屽鏋滄病鏈夛紝鍒欓粯璁や負浣跨敤http鍗忚銆傞氬父榪樻湁鍏跺畠鐨勫崗璁https銆乻sl銆乫tp銆乵ailto絳夈傚洜姝ゅ尮閰嶅崗璁悕鐨勬鍒欒〃杈懼紡搴旇鏄??:(mailto|ssh|ftp|https?)://)?錛屾敞鎰忚繖涓〃杈懼紡鏈韓鎹曡幏浜嗗崗璁悕錛屼絾涓嶅寘鎷?//銆?br />    
鏈嶅姟鍣?/strong>
   鎴栨槸鍩熷悕錛屽www.csdn.net錛涙垨鏄疘P鍦板潃錛屽192.168.1.1錛屽彲甯︾鍙e彿錛屽192.168.1.1:8080銆傚尮閰嶅煙鍚嶇殑姝e垯琛ㄨ揪寮忎負(?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?\.)+(?:com|net|edu|biz|gov|org|in(?:t|fo)|(?-i:[a-z][a-z]))錛岃〃杈懼紡"(?:com|net|edu|biz|gov|org|in(?:t|fo)"鍖歸厤浜哻om銆乶et銆乪du銆乥iz銆乬ov銆乷rg銆乮nt銆乮nfo絳夊父瑙佺殑鍩熷悕錛岃??-i:[a-z][a-z])鍖歸厤浜嗗浗瀹朵唬鐮侊紝鑰屼笖鍙厑璁稿皬鍐欎負鍚堟硶鐨勶紝濡倃ww.richcomm.com.cn銆傚尮閰岻P瑕佸敖閲忕簿紜紝鑰冭檻鍒癐P姣忛儴鍒嗗簲涓烘暟瀛椾笖鑼冨洿鍦?-255涔嬮棿錛屽洜姝よ〃杈懼紡搴斾負(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.(?:[01]?\d\d?|2[0-4]\d|25[0-5])銆傛敞鎰忎互涓婂煙鍚嶆垨IP鐨勬鍒欏紡鏈韓涓嶆崟鑾峰畠浠紝榪欐槸涓轟簡鐣欏湪鍚庨潰浣滀負鏁翠綋鎹曡幏銆?br />    绔彛鍙風殑姝e垯琛ㄨ揪寮忎負(?::(\d{1,5}))?錛岃繖閲岄檺鍒朵簡绔彛鍙蜂負1鑷?浣嶇殑鏁板瓧錛屾洿綺劇‘鐨勫尮閰嶅瑕佹眰鍦ㄦ煇鑼冨洿濡俒1024,65535]闂村垯鍙弬鑰冧互涓奍P姝e垯妯″紡銆傜患涓婃墍寰楋紝鍖歸厤鏈嶅姟鍣ㄧ殑姝e垯琛ㄨ揪寮忎負((?:(?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?\.)+(?:com|net|edu|biz|gov|org|in(?:t|fo)|(?-i:[a-z][a-z]))|(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.(?:[01]?\d\d?|2[0-4]\d|25[0-5])))(?::(\d{1,5}))?錛岃繖涓鍒欏紡浣滀負鏁翠綋鎹曡幏浜嗗煙鍚嶆垨IP錛屽強绔彛鍙鳳紙鑻ユ湁錛夛紝濡倃ww.csdn.net錛屽垯寰楀埌www.csdn.net鍜岀┖錛堟病鏈夌鍙o紝http榛樿涓?0錛宧ttps榛樿涓?43錛夊瓙涓詫紱192.168.1.1:8080鍒欏緱鍒?92.168.1.1鍜?080瀛愪覆銆?br />    
璺緞
   鏈綆鍗曠殑褰㈠紡涓?/.*)?錛屾洿綺劇‘鐨勫艦寮忎負/[^.!,?;"'<>()\[\]{}\s\x7F-\xFF]*(?:[.!,?]+[^.!,?;"'<>()\[\]{}\s\x7F-\xFF]+)*銆?br />    
   浠ヤ笂鎵鏈夋鍒欒〃杈懼紡鍧囦負ascii瀛楃闆嗭紝瀵逛簬unicode瀛楃闆嗗垯鍦ㄥ叾鍓嶅姞L鍗沖彲銆?br />    
   涓烘柟渚夸嬌鐢紝灝佽鎴愪簡涓や釜鑷敱妯℃澘鍑芥暟錛屽涓嬫墍紺?
 1template<typename charT>
 2inline bool boost_match(const charT* pattern,const charT* text,unsigned int flags=boost::regex::normal,boost::match_results<const charT*>* result=NULL)
 3{
 4    boost::basic_regex<charT,boost::regex_traits<charT> > expression(pattern,flags); 
 5    if(NULL==result)
 6        return boost::regex_match(text,expression);
 7    return boost::regex_match(text,*result,expression);
 8}

 9
10template<typename charT>
11inline bool boost_search(const charT* pattern,const charT* text,unsigned int flags=boost::regex::normal,boost::match_results<const charT*>* result=NULL)
12{
13    boost::basic_regex<charT,boost::regex_traits<charT> > expression(pattern,flags); 
14    if(NULL==result)
15        return boost::regex_search(text,expression);
16    return boost::regex_search(text,*result,expression);
17}
   
   嫻嬭瘯紺轟緥濡備笅      
 1static const string protocol = "(?:(mailto|ssh|ftp|https?)://)?";
 2static const string hostname = "(?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?\\.)+(?:com|net|edu|biz|gov|org|in(?:t|fo)|(?-i:[a-z][a-z]))";
 3static const string ip = "(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.(?:[01]?\\d\\d?|2[0-4]\\d|25[0-5])";
 4static const string port = "(?::(\\d{1,5}))?";
 5static const string path = "(/.*)?";
 6static const string pattern = protocol + "((?:" + hostname + "|" + ip + "))" + port + path;
 7
 8int _tmain(int argc, _TCHAR* argv[])
 9{
10    using namespace boost;
11
12    //褰㈠紡1: 甯﹀崗璁悕,鏈嶅姟鍣ㄤ負鍚嶇О,涓嶅甫绔彛鍙?/span>
13    bool ret;
14    string text = "http://www.shnenglu.com/qinqing1984";
15    boost::cmatch what;
16    ret=boost_match(pattern.c_str(),text.c_str(),regex::icase|regex::perl,&what);
17    assert(ret);
18    assert(what[1].str()=="http");
19    assert(what[2].str()=="www.shnenglu.com");
20    assert(what[3].str()=="");
21    assert(what[4].str()=="/qinqing1984");
22
23    //褰㈠紡2: 涓嶅甫鍗忚鍚?鏈嶅姟鍣ㄤ負鍚嶇О,甯︾鍙e彿
24    text = "www.shnenglu.com:80/qinqing1984";
25    ret=boost_match(pattern.c_str(),text.c_str(),regex::icase|regex::perl,&what);
26    assert(ret);
27    assert(what[1].str()=="");
28    assert(what[2].str()=="www.shnenglu.com");
29    assert(what[3].str()=="80");
30    assert(what[4].str()=="/qinqing1984");
31
32    //褰㈠紡3: 涓嶅甫鍗忚鍚?鏈嶅姟鍣ㄤ負鍚嶇О,涓嶅甫璺緞
33    text = "www.shnenglu.com:80";
34    ret=boost_match(pattern.c_str(),text.c_str(),regex::icase|regex::perl,&what);
35    assert(ret);
36    assert(what[1].str()=="");
37    assert(what[2].str()=="www.shnenglu.com");
38    assert(what[3].str()=="80");
39    assert(what[4].str()=="");
40
41    //褰㈠紡4: 鍗忚涓篽ttps,鏈嶅姟鍣ㄤ負IP,甯︾鍙e彿
42    text = "https://192.168.1.1:443/index.html";
43    ret=boost_match(pattern.c_str(),text.c_str(),regex::icase|regex::perl,&what);
44    assert(ret);
45    assert(what[1].str()=="https");
46    assert(what[2].str()=="192.168.1.1");
47    assert(what[3].str()=="443");
48    assert(what[4].str()=="/index.html");
49
50    //褰㈠紡5: 绔彛瓚呰繃5浣嶆暟
51    text = "ftp://192.168.1.1:888888";
52    ret=boost_match(pattern.c_str(),text.c_str(),regex::icase|regex::perl,&what);
53    assert(!ret);
54
55    //褰㈠紡6: 娌℃湁鍗忚鍚?/span>
56    text = "//192.168.1.1/index.html";
57    ret=boost_match(pattern.c_str(),text.c_str(),regex::icase|regex::perl,&what);
58    assert(!ret);
59
60    //褰㈠紡7: 娌℃湁鏈嶅姟鍣?/span>
61    text = "http:///index.html";
62    ret=boost_match(pattern.c_str(),text.c_str(),regex::icase|regex::perl,&what);
63    assert(!ret);
64
65    //褰㈠紡8: 涓嶅悎娉曠殑鏈嶅姟鍣?/span>
66    text = "cppblog/index.html";
67    ret=boost_match(pattern.c_str(),text.c_str(),regex::icase|regex::perl,&what);
68    assert(!ret);
69
70    return 0;
71}
   瀵筓RL鐨勮В鏋愶紝鍥犳椂闂存湁闄愶紝鏈枃鎵榪頒笉灝借緇嗭紝鍙槸鐣ヤ綔鍒嗘瀽錛屼互鐐瑰甫闈紝鏇村鐨勭簿紜尮閰嶅垯渚濊禆浜庡疄闄呯殑搴旂敤闇姹傘?img src ="http://www.shnenglu.com/qinqing1984/aggbug/161035.html" width = "1" height = "1" />

]]>
鍩轟簬stl搴忓垪瀹瑰櫒瀹炵幇鐨勯氱敤闆嗗悎綾?(綰跨▼瀹夊叏鐗?http://www.shnenglu.com/qinqing1984/archive/2011/10/21/158841.html鏄ョ鍗佷簩鏈?/dc:creator>鏄ョ鍗佷簩鏈?/author>Fri, 21 Oct 2011 10:43:00 GMThttp://www.shnenglu.com/qinqing1984/archive/2011/10/21/158841.htmlhttp://www.shnenglu.com/qinqing1984/comments/158841.htmlhttp://www.shnenglu.com/qinqing1984/archive/2011/10/21/158841.html#Feedback1http://www.shnenglu.com/qinqing1984/comments/commentRss/158841.htmlhttp://www.shnenglu.com/qinqing1984/services/trackbacks/158841.html闃呰鍏ㄦ枃

]]>
鍩轟簬stl搴忓垪瀹瑰櫒瀹炵幇鐨勯氱敤闆嗗悎綾?/title><link>http://www.shnenglu.com/qinqing1984/archive/2011/07/16/151151.html</link><dc:creator>鏄ョ鍗佷簩鏈?/dc:creator><author>鏄ョ鍗佷簩鏈?/author><pubDate>Sat, 16 Jul 2011 04:23:00 GMT</pubDate><guid>http://www.shnenglu.com/qinqing1984/archive/2011/07/16/151151.html</guid><wfw:comment>http://www.shnenglu.com/qinqing1984/comments/151151.html</wfw:comment><comments>http://www.shnenglu.com/qinqing1984/archive/2011/07/16/151151.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/qinqing1984/comments/commentRss/151151.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/qinqing1984/services/trackbacks/151151.html</trackback:ping><description><![CDATA[     鎽樿:    鍦ㄩ潰鍚戝璞″紑鍙戞椂錛屽瀹為檯闂鍒嗘瀽榪涜屾娊璞″嚭涓縐嶇被鍨嬶紝寰寰浼氳冭檻鍒?涓柟闈細1錛夌被鍨嬬殑鍐呴儴鎴愬憳鍜屾柟娉曠殑瀹氫箟鎻忚堪 2錛夌被鍨嬬殑澶氬疄渚嬪瓨鍙栨搷浣溿傚叾涓1鐐規槸綾誨瀷鏈韓鏁版嵁緇撴瀯鐨勮璁★紝絎?鐐規槸綾誨瀷瀹瑰櫒鏁版嵁緇撴瀯鐨勯夋嫨璁捐銆傚湪stl涓紝瀹瑰櫒鏈夊簭鍒楀紡鍜屽叧鑱斿紡涓ょ錛屽墠鑰呬唬琛ㄦ湁vector錛宭ist錛宒eque絳夛紱鍚庤呬唬琛ㄦ湁set錛宮ultiset錛宮ap錛宮ultimap絳夛紝瀵逛簬涓...  <a href='http://www.shnenglu.com/qinqing1984/archive/2011/07/16/151151.html'>闃呰鍏ㄦ枃</a><img src ="http://www.shnenglu.com/qinqing1984/aggbug/151151.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/qinqing1984/" target="_blank">鏄ョ鍗佷簩鏈?/a> 2011-07-16 12:23 <a href="http://www.shnenglu.com/qinqing1984/archive/2011/07/16/151151.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>絀哄熀綾諱紭鍖朎BO涔嬫繁搴︽帰绱?/title><link>http://www.shnenglu.com/qinqing1984/archive/2011/07/10/150584.html</link><dc:creator>鏄ョ鍗佷簩鏈?/dc:creator><author>鏄ョ鍗佷簩鏈?/author><pubDate>Sun, 10 Jul 2011 04:58:00 GMT</pubDate><guid>http://www.shnenglu.com/qinqing1984/archive/2011/07/10/150584.html</guid><wfw:comment>http://www.shnenglu.com/qinqing1984/comments/150584.html</wfw:comment><comments>http://www.shnenglu.com/qinqing1984/archive/2011/07/10/150584.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/qinqing1984/comments/commentRss/150584.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/qinqing1984/services/trackbacks/150584.html</trackback:ping><description><![CDATA[<strong style="font-size: 12pt">緇ф壙鎯呮櫙</strong><br />    鎴戜滑鐭ラ亾涓涓┖鐨勭被錛屼篃灝辨槸鍏跺唴閮ㄦ病鏈夐潪闈欐佹暟鎹垚鍛橈紝娌℃湁铏氭寚閽堬紙鍖呮嫭鎸囧悜铏氬嚱鏁拌〃鍜岃櫄鍩虹被瀛愬璞$殑鎸囬拡錛夛紝瀹冪殑澶у皬閫氬父涓?錛屽綋鐒跺湪鏌愪簺瀵歸綈瑕佹眰涓ユ牸緋葷粺涓婂彲鑳芥槸鍙︿竴涓暟錛堥氬父鏄?錛夛紝濡傛灉絀虹被琚戶鎵匡紝閭d箞媧劇敓綾葷殑澶у皬浼氭庝箞鏍峰憿錛熶竴涓敮鎸丆++鏍囧噯鍜孍BO鐨勭紪璇戝櫒瀵規浼氳繘琛岀┖鍩虹被鐨勪紭鍖栵紝涔熷氨鏄笉緇欑┖鐨勫熀綾誨瓙瀵硅薄鍒嗛厤絀洪棿錛屾崲鍙ヨ瘽璇達紝絀哄熀綾誨瓙瀵硅薄鐨勫湴鍧鍜屽叾媧劇敓綾誨疄渚嬬殑鍦板潃鏄浉鍚岀殑銆備粠緙栬瘧鍣ㄥ疄鐜扮殑瑙掑害鏉ョ湅錛岄渶瑕佽冭檻緇ф壙鏃剁殑涓嶅悓鎯呭喌錛屼笅鍥句腑P琛ㄧず鐖剁被錛孋琛ㄧず瀛愮被錛屽渾褰㈣〃紺虹┖綾伙紝鐭╁艦琛ㄧず闈炵┖綾匯傚崟緇ф壙EBO鎯呭喌濡備笅鍥炬墍紺? <div align="center"><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/s_ebo_inherit_ex_2.JPG" width="461" height="260" /></div>    EBO-1鍙嶆槧鐨勬槸絀虹被媧劇敓鑷┖鍩虹被錛孍BO-2鍙嶆槧鐨勬槸闈炵┖綾繪淳鐢熻嚜絀哄熀綾伙紝EBO-3銆丒BO-4鍙嶆槧鐨勬槸鍦ㄧ戶鎵塊摼涓紝瀵圭┖鍩虹被鐨勪紭鍖栬兘涓嶈兘浼犻掑埌鍚庝唬涓傚緇ф壙EBO濡備笅鍥炬墍紺?br /> <div align="center"><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/qinqing1984/m_ebo_inherit_ex_1.JPG" width="655" height="157" /></div>    EBO-5鍙嶆槧鐨勬槸絀虹被媧劇敓鑷袱涓┖鍩虹被錛孍BO-6鍙嶆槧鐨勬槸闈炵┖綾繪淳鐢熻嚜涓や釜絀哄熀綾伙紝EBO-6鍙嶆槧鐨勬槸絀虹被媧劇敓鑷竴涓潪絀哄熀綾誨拰涓涓┖鍩虹被錛孍BO-7鍙嶆槧鐨勬槸闈炵┖綾繪淳鐢熻嚜涓涓潪絀哄熀綾誨拰涓涓┖鍩虹被銆備互涓?縐嶆儏鍐碉紝涓嶈鏄崟緇ф壙榪樻槸澶氱戶鎵匡紝涓涓畬鍏ㄦ敮鎸丒BO鐨勭紪璇戝櫒灝卞簲璇ヨ兘鎶婄┖鍩虹被閮ㄥ垎閮戒紭鍖栨帀銆?br /> <br /> <strong style="font-size: 12pt">浼樺寲搴旂敤</strong><br />    <span>鐢變簬絀哄熀綾諱紭鍖栨妧鏈妭鐪佷簡瀵硅薄涓嶅繀瑕佺殑絀洪棿錛屾彁楂樹簡榪愯鏁堢巼錛屽洜姝ゆ垚涓烘煇浜涘己澶ф妧鏈殑鍩虹煶錛屽熀浜庣被鍨嬪畾涔夌被濡俿tl涓殑binary_function銆乽nary_function銆乮terator銆乮terator_traits鐨勫疄鐜板鐢紱鍩轟簬絳栫暐綾誨鍐呭瓨綆$悊銆佸綰跨▼瀹夊叏鍚屾鐨勫疄鐜板鐢ㄣ傚綋鏌愪釜綾誨瓨鍦ㄧ┖綾葷被鍨嬬殑鏁版嵁鎴愬憳鏃訛紝涔熷彲鑰冭檻鍊熷姪EBO浼樺寲瀵硅薄甯冨眬錛屼緥濡備笅 <div align="center"> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"> <div align="left"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080; font-size: 10pt">1</span><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><span style="color: #000000; font-size: 10pt">template</span><span style="color: #000000; font-size: 10pt"><</span><span style="color: #000000; font-size: 10pt">typename T1,typename T2</span><span style="color: #000000; font-size: 10pt">></span><span style="color: #000000"><br /> </span><span style="color: #008080; font-size: 10pt">2</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff; font-size: 10pt">class</span><span style="color: #000000; font-size: 10pt"> EBO<br /> </span><span style="color: #008080; font-size: 10pt">3</span><span style="color: #000000"><img id="Codehighlighter1_44_75_Open_Image" onclick="this.style.display='none'; Codehighlighter1_44_75_Open_Text.style.display='none'; Codehighlighter1_44_75_Closed_Image.style.display='inline'; Codehighlighter1_44_75_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_44_75_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_44_75_Closed_Text.style.display='none'; Codehighlighter1_44_75_Open_Image.style.display='inline'; Codehighlighter1_44_75_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_44_75_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_44_75_Open_Text"><span style="color: #000000; font-size: 10pt">{<br /> </span><span style="color: #008080; font-size: 10pt">4</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #0000ff; font-size: 10pt">private</span><span style="color: #000000; font-size: 10pt">:<br /> </span><span style="color: #008080; font-size: 10pt">5</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #000000; font-size: 10pt">    T1 m_t1;<br /> </span><span style="color: #008080; font-size: 10pt">6</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #000000; font-size: 10pt">    T2 m_t2;<br /> </span><span style="color: #008080; font-size: 10pt">7</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" /></span><span style="color: #000000; font-size: 10pt">}</span></span><span style="color: #000000; font-size: 10pt">;</span></div> </div> </div> </span>   <span>褰揟1鍜孴2涓虹┖綾繪椂錛屽彲浠ユ敼榪涘涓?/span><br /> <span></span><span> <div align="center"> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"> <div align="left"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080">1</span><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><span style="color: #000000">template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">2</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO : T1, T2<br /> </span><span style="color: #008080">3</span><span style="color: #000000"><img id="Codehighlighter1_53_55_Open_Image" onclick="this.style.display='none'; Codehighlighter1_53_55_Open_Text.style.display='none'; Codehighlighter1_53_55_Closed_Image.style.display='inline'; Codehighlighter1_53_55_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_53_55_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_53_55_Closed_Text.style.display='none'; Codehighlighter1_53_55_Open_Image.style.display='inline'; Codehighlighter1_53_55_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_53_55_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_53_55_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">4</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;</span></div> </div> </div> </span>   <br />    <span>鏇磋繘涓姝ワ紝濡傛灉T1鎴朤2涓洪潪綾葷被鍨嬶紝濡傚熀鏈唴寤虹被鍨嬨佸嚱鏁版寚閽堢瓑錛涙垨T1鍜孴2綾誨瀷鐩稿悓鏃訛紝鍒欑洿鎺ョ戶鎵垮畠浠細瀵艱嚧緙栬瘧閿欒錛屾庝箞鍔炲憿錛熻繖鏃跺彲浠ユ坊鍔犱竴涓腑闂村眰鏉ヨВ鍐籌紝浠g爜濡備笅 <div align="center"> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"> <div align="left"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080"> 1</span><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><span style="color: #000000">template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2,</span><span style="color: #0000ff">bool</span><span style="color: #000000"> isSame,</span><span style="color: #0000ff">bool</span><span style="color: #000000"> isFirstEmpty,</span><span style="color: #0000ff">bool</span><span style="color: #000000"> isSecondEmpty</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO_IMPL;<br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO_IMPL</span><span style="color: #000000"><</span><span style="color: #000000">T1,T2,</span><span style="color: #0000ff">false</span><span style="color: #000000">,</span><span style="color: #0000ff">false</span><span style="color: #000000">,</span><span style="color: #0000ff">false</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img id="Codehighlighter1_175_197_Open_Image" onclick="this.style.display='none'; Codehighlighter1_175_197_Open_Text.style.display='none'; Codehighlighter1_175_197_Closed_Image.style.display='inline'; Codehighlighter1_175_197_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_175_197_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_175_197_Closed_Text.style.display='none'; Codehighlighter1_175_197_Open_Image.style.display='inline'; Codehighlighter1_175_197_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_175_197_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_175_197_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    T1 m_t1;<br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    T2 m_t2;<br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO_IMPL</span><span style="color: #000000"><</span><span style="color: #000000">T1,T2,</span><span style="color: #0000ff">false</span><span style="color: #000000">,</span><span style="color: #0000ff">true</span><span style="color: #000000">,</span><span style="color: #0000ff">true</span><span style="color: #000000">></span><span style="color: #000000"> : T1,T2<br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img id="Codehighlighter1_281_283_Open_Image" onclick="this.style.display='none'; Codehighlighter1_281_283_Open_Text.style.display='none'; Codehighlighter1_281_283_Closed_Image.style.display='inline'; Codehighlighter1_281_283_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_281_283_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_281_283_Closed_Text.style.display='none'; Codehighlighter1_281_283_Open_Image.style.display='inline'; Codehighlighter1_281_283_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_281_283_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_281_283_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /> </span><span style="color: #008080">15</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">16</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO_IMPL</span><span style="color: #000000"><</span><span style="color: #000000">T1,T2,</span><span style="color: #0000ff">false</span><span style="color: #000000">,</span><span style="color: #0000ff">true</span><span style="color: #000000">,</span><span style="color: #0000ff">false</span><span style="color: #000000">></span><span style="color: #000000"> : T1<br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img id="Codehighlighter1_365_377_Open_Image" onclick="this.style.display='none'; Codehighlighter1_365_377_Open_Text.style.display='none'; Codehighlighter1_365_377_Closed_Image.style.display='inline'; Codehighlighter1_365_377_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_365_377_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_365_377_Closed_Text.style.display='none'; Codehighlighter1_365_377_Open_Image.style.display='inline'; Codehighlighter1_365_377_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_365_377_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_365_377_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">19</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    T2 m_t2;<br /> </span><span style="color: #008080">20</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /> </span><span style="color: #008080">21</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">22</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">23</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO_IMPL</span><span style="color: #000000"><</span><span style="color: #000000">T1,T2,</span><span style="color: #0000ff">false</span><span style="color: #000000">,</span><span style="color: #0000ff">false</span><span style="color: #000000">,</span><span style="color: #0000ff">true</span><span style="color: #000000">></span><span style="color: #000000"> : T2<br /> </span><span style="color: #008080">24</span><span style="color: #000000"><img id="Codehighlighter1_459_471_Open_Image" onclick="this.style.display='none'; Codehighlighter1_459_471_Open_Text.style.display='none'; Codehighlighter1_459_471_Closed_Image.style.display='inline'; Codehighlighter1_459_471_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_459_471_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_459_471_Closed_Text.style.display='none'; Codehighlighter1_459_471_Open_Image.style.display='inline'; Codehighlighter1_459_471_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_459_471_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_459_471_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    T1 m_t1;<br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /> </span><span style="color: #008080">27</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">28</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">29</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO_IMPL</span><span style="color: #000000"><</span><span style="color: #000000">T1,T2,</span><span style="color: #0000ff">true</span><span style="color: #000000">,</span><span style="color: #0000ff">false</span><span style="color: #000000">,</span><span style="color: #0000ff">false</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">30</span><span style="color: #000000"><img id="Codehighlighter1_548_570_Open_Image" onclick="this.style.display='none'; Codehighlighter1_548_570_Open_Text.style.display='none'; Codehighlighter1_548_570_Closed_Image.style.display='inline'; Codehighlighter1_548_570_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_548_570_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_548_570_Closed_Text.style.display='none'; Codehighlighter1_548_570_Open_Image.style.display='inline'; Codehighlighter1_548_570_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_548_570_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_548_570_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">31</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    T1 m_t1;<br /> </span><span style="color: #008080">32</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    T2 m_t2;<br /> </span><span style="color: #008080">33</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /> </span><span style="color: #008080">34</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">35</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">36</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO_IMPL</span><span style="color: #000000"><</span><span style="color: #000000">T1,T2,</span><span style="color: #0000ff">true</span><span style="color: #000000">,</span><span style="color: #0000ff">true</span><span style="color: #000000">,</span><span style="color: #0000ff">true</span><span style="color: #000000">></span><span style="color: #000000"> : T1<br /> </span><span style="color: #008080">37</span><span style="color: #000000"><img id="Codehighlighter1_650_662_Open_Image" onclick="this.style.display='none'; Codehighlighter1_650_662_Open_Text.style.display='none'; Codehighlighter1_650_662_Closed_Image.style.display='inline'; Codehighlighter1_650_662_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_650_662_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_650_662_Closed_Text.style.display='none'; Codehighlighter1_650_662_Open_Image.style.display='inline'; Codehighlighter1_650_662_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_650_662_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_650_662_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">38</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" />    T2 m_t2;<br /> </span><span style="color: #008080">39</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;<br /> </span><span style="color: #008080">40</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">41</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" />template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">42</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO : EBO_IMPL</span><span style="color: #000000"><</span><span style="color: #000000">T1,T2,boost::is_same</span><span style="color: #000000"><</span><span style="color: #000000">T1,T2</span><span style="color: #000000">></span><span style="color: #000000">::value,boost::is_empty</span><span style="color: #000000"><</span><span style="color: #000000">T1</span><span style="color: #000000">></span><span style="color: #000000">::value,boost::is_empty</span><span style="color: #000000"><</span><span style="color: #000000">T2</span><span style="color: #000000">></span><span style="color: #000000">::value</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">43</span><span style="color: #000000"><img id="Codehighlighter1_811_813_Open_Image" onclick="this.style.display='none'; Codehighlighter1_811_813_Open_Text.style.display='none'; Codehighlighter1_811_813_Closed_Image.style.display='inline'; Codehighlighter1_811_813_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_811_813_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_811_813_Closed_Text.style.display='none'; Codehighlighter1_811_813_Open_Image.style.display='inline'; Codehighlighter1_811_813_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_811_813_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_811_813_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">44</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;</span></div> </div> </div> </span><span></span> <div align="center"></div> <span></span> <div align="center"></div>    涓轟簡綆渚匡紝鐩存帴浣跨敤浜哹oost涓殑is_same錛宨s_empty鍏冨嚱鏁版潵鍒ゆ柇綾誨瀷鐨勫睘鎬э紝瀹為檯涓奲oost涓凡緇忓疄鐜頒簡EBO鐨勯夋嫨榪愮敤宸ュ叿鍗砪ompressed_pair綾繪ā鏉匡紝鐮旂┒鍏舵簮鐮佸彲鍙戠幇錛岃宸ュ叿鍏呭垎鑰冭檻鍒頒簡T1鍜孴2瀹為檯綾誨瀷鐨勫悇縐嶆儏鍐碉紝is_empty鐨勫垽鏂槸榪愮敤sizeof鏉ユ瘮杈冪被鍨嬪ぇ灝忕‘瀹氱殑銆傛浛鎹ompressed_pair鍚庯紝浠g爜濡備笅 <div align="center"> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"> <div align="left"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080">1</span><img alt="" align="top" src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" /><span style="color: #000000">template</span><span style="color: #000000"><</span><span style="color: #000000">typename T1,typename T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">2</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> EBO: boost::compressed_pair</span><span style="color: #000000"><</span><span style="color: #000000">T1,T2</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">3</span><span style="color: #000000"><img id="Codehighlighter1_75_77_Open_Image" onclick="this.style.display='none'; Codehighlighter1_75_77_Open_Text.style.display='none'; Codehighlighter1_75_77_Closed_Image.style.display='inline'; Codehighlighter1_75_77_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_75_77_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_75_77_Closed_Text.style.display='none'; Codehighlighter1_75_77_Open_Image.style.display='inline'; Codehighlighter1_75_77_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_75_77_Closed_Text"><img alt="" src="http://www.shnenglu.com/Images/dot.gif" /></span><span id="Codehighlighter1_75_77_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">4</span><span style="color: #000000"><img alt="" align="top" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span><span style="color: #000000">;</span></div> </div> </div><img src ="http://www.shnenglu.com/qinqing1984/aggbug/150584.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/qinqing1984/" target="_blank">鏄ョ鍗佷簩鏈?/a> 2011-07-10 12:58 <a href="http://www.shnenglu.com/qinqing1984/archive/2011/07/10/150584.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍒犻櫎vector瀹瑰櫒鍐呯殑閲嶅鍏冪礌http://www.shnenglu.com/qinqing1984/archive/2011/06/25/149432.html鏄ョ鍗佷簩鏈?/dc:creator>鏄ョ鍗佷簩鏈?/author>Sat, 25 Jun 2011 06:49:00 GMThttp://www.shnenglu.com/qinqing1984/archive/2011/06/25/149432.htmlhttp://www.shnenglu.com/qinqing1984/comments/149432.htmlhttp://www.shnenglu.com/qinqing1984/archive/2011/06/25/149432.html#Feedback3http://www.shnenglu.com/qinqing1984/comments/commentRss/149432.htmlhttp://www.shnenglu.com/qinqing1984/services/trackbacks/149432.html
 1//鍑芥暟瀵硅薄妯℃澘綾?/span>
 2template<typename T>
 3struct Predicate
 4{
 5    Predicate()
 6    {
 7    }
 8
 9    Predicate(const T& t)
10        :_t(t)
11    {
12    }
13    bool operator()(const T& t) const
14    {
15        //鍙互鑷畾涔夋瘮杈冨疄鐜?/span>
16        return _t == t;
17    }
18    //鏀寔std::unique璋撹瘝鐗堟湰鐨勫垹闄?/span>
19    bool operator()(const T& l,const T& r) const
20    {
21        //鍙互鑷畾涔夋瘮杈冨疄鐜?/span>
22        return l == r;
23    }

24    T _t;
25}
;
26
27//quick_unique鐗堟湰1: 鐩哥瓑鍒ゆ柇
28template<typename T>
29void quick_unique(std::vector<T>& con)
30{
31    std::sort(con.begin(),con.end());
32    con.erase(std::unique(con.begin(),con.end()),con.end());
33}

34
35//quick_unique鐗堟湰2: 璋撹瘝鍒ゆ柇
36template<typename T,template <typename U> class Predicate>
37void quick_unique(std::vector<T>& con)
38{
39    std::sort(con.begin(),con.end());
40    con.erase(std::unique(con.begin(),con.end(),Predicate<T>()),con.end());
41}
42
43//stable_unique鐗堟湰1: 鐩哥瓑鍒ゆ柇
44template<typename T>
45void stable_unique(std::vector<T>& con)
46{
47    std::vector<T>::iterator it,ret,beg = con.begin();
48    for (it = ++con.begin();it!=con.end();)
49    {
50        ret = find(beg,it,*it);
51        if (ret != it)
52            it = con.erase(it);
53        else
54            ++it;
55    }
56}
57
58//stable_unique鐗堟湰2: 璋撹瘝鍒ゆ柇
59template<typename T,template <typename U> class Predicate>
60void stable_unique(std::vector<T>& con)
61{
62    std::vector<T>::iterator it,ret,beg = con.begin();
63    for (it = ++con.begin();it!=con.end();)
64    {
65        ret = find_if(beg,it,Predicate<T>(*it));
66        if (ret != it)
67            it = con.erase(it);
68        else
69            ++it;
70    }
71}
   浠ヤ笂浠g爜鍦╲c2005鐜涓嬬紪璇戞祴璇曢氳繃錛屽啀榪涗竴姝ユ墿灞曪紝闂瀹屽叏鍙互褰掔被涓哄垹闄ゆ煇瀹瑰櫒鍐呴噸澶嶅厓绱狅紝鍙鍐嶅姞涓涓ā鏉跨殑妯℃澘鍙傛暟鍗沖彲template <typename T> class Conn;鍑芥暟鐨勫艦鍙傜被鍨嬪彉涓簊td::Conn<T>灝辮浜嗭紝浣嗚娉ㄦ剰鐨勬槸涓嶅悓騫沖彴涓嬪搴斿鍣ㄧ殑erase瀹炵幇鎵榪斿洖鐨勮凱浠e櫒鍙兘鏈夋墍宸埆錛屾瘮濡俶ap瑕佽繖鏍峰啓鎵嶈兘鍦╨inux涓婃紜伐浣滐細conn.erase(it++)銆傚浜庣壒孌婄殑鎯呭喌錛屽彲瀵逛互涓?涓嚱鏁頒綔瀵瑰簲鐨勯噸杞斤紙娉ㄦ剰錛屽嚱鏁版ā鏉挎病鏈夌壒鍖栫殑姒傚康錛夋潵瑙e喅銆?img src ="http://www.shnenglu.com/qinqing1984/aggbug/149432.html" width = "1" height = "1" />

]]>
嫻呰皥ACE涓殑鍚屾鏈哄埗http://www.shnenglu.com/qinqing1984/archive/2009/04/02/78702.html鏄ョ鍗佷簩鏈?/dc:creator>鏄ョ鍗佷簩鏈?/author>Thu, 02 Apr 2009 08:33:00 GMThttp://www.shnenglu.com/qinqing1984/archive/2009/04/02/78702.htmlhttp://www.shnenglu.com/qinqing1984/comments/78702.htmlhttp://www.shnenglu.com/qinqing1984/archive/2009/04/02/78702.html#Feedback1http://www.shnenglu.com/qinqing1984/comments/commentRss/78702.htmlhttp://www.shnenglu.com/qinqing1984/services/trackbacks/78702.html   ACE涓殑鍚屾鏈哄埗鏄交閲忕駭楂樻晥鐨勶紝瀹冧笉鍚屼簬MFC涓殑鍚屾綾伙紝MFC涓殑鍚屾綾婚噰鐢ㄤ簡綾葷戶鎵跨殑鏂瑰紡錛岃孉CE騫舵病鏈夌敤緇ф壙鏂瑰紡錛屽悇涓笉鍚岀殑閿佺被鏄鉤琛岀殑鍏崇郴錛岃繖浜涚被鏀寔鐩稿悓鐨勬帴鍙o紝鍗沖畠浠殑鎵鏈夊叕鍏辨柟娉曟槸鐩稿悓鐨勶紝鍥犳鍙閫傞厤鐢ㄤ簬鍔ㄦ佺粦瀹氬拰鏇挎崲錛岃繖縐嶅姩鎬佺粦瀹氭槸娌℃湁铏氬嚱鏁拌皟鐢ㄥ紑閿鐨?涓旇繖浜涙柟娉曚唬鐮佺煭灝忎嬌鐢ㄤ簡鍐呰仈瀹炵幇銆傚簲鐢ㄧ▼搴忓紑鍙戣呭彲浠ラ氳繃鎸囧畾妯℃澘瀹炲弬鏉ヤ嬌鐢ㄤ笉鍚岀殑閿侊紝騫跺彲鍦ㄨ繍琛屾椂鍔ㄦ佹浛鎹€?/span>

   ACE涓殑閿佹槸鏄撲簬浣跨敤鐨勶紝鏃㈡湁浜掓枼閿?ACE_Mutex)鍙堟湁璇誨啓閿?ACE_RW_Mutex)錛岃繖浜涢攣鍙堢粏鍒嗕負涓撻棬鐢ㄤ簬綰跨▼鍚屾(ACE_Thread_Mutex,ACE_RW_Thread_Mutex)鍜岃繘紼?ACE_Process_Mutex,ACE_RW_Process_Mutex)鍚屾鐨勭壒瀹氶攣銆傜浉姣擬FC楂樼駭鐨勬槸ACE涓繕鎻愪緵浜嗛掑綊浜掓枼浣?ACE_Token)錛屽彲鏈夋晥鍦扮敤浜庢煇浜涢掑綊渚嬬▼銆?/span>

   ACE涓彁渚涗簡ACE_Lock閿佹娊璞″熀綾誨拰ACE_Adapter_Lock閿侀傞厤鍣ㄦā鏉跨被錛孉CE_Adapter_Lock浠嶢CE_Lock緇ф壙錛屽疄鐜頒簡鍔ㄦ佺粦瀹氬拰鏇挎崲銆傚彟澶栵紝ACE榪樻彁渚涗簡ACE_Atomic_Op妯℃澘綾伙紝閲嶈澆浜嗗熀鏈殑綆楁湳榪愮畻絎︼紝瀹炵幇浜嗗師瀛愬寲綆楁湳榪愮畻銆?/span>



]]>
久久久久久精品无码人妻| 久久久久久久97| 国产亚洲色婷婷久久99精品| 亚洲国产精品无码久久SM | 久久ZYZ资源站无码中文动漫| 青青草国产97免久久费观看| 日日狠狠久久偷偷色综合免费| 93精91精品国产综合久久香蕉| 日本三级久久网| 超级97碰碰碰碰久久久久最新| 一本色道久久综合亚洲精品| 日本三级久久网| 久久99精品久久久久久秒播| 中文字幕热久久久久久久| 久久精品国产亚洲AV香蕉| 亚洲国产精品久久电影欧美| 久久精品亚洲中文字幕无码麻豆| 精品国产一区二区三区久久| 精品久久久久久久国产潘金莲| 国产成人综合久久精品红| 亚洲愉拍99热成人精品热久久| 色综合久久综合中文综合网| 久久精品国内一区二区三区| 国产精品美女久久久久AV福利| 久久久一本精品99久久精品66 | 亚洲综合精品香蕉久久网97| 国产三级观看久久| 亚洲中文字幕久久精品无码APP| 色综合久久中文综合网| 久久伊人五月天论坛| 精品乱码久久久久久夜夜嗨| 久久久精品国产免大香伊 | 91久久婷婷国产综合精品青草 | 2021久久精品免费观看| 久久99精品国产麻豆| 久久这里只有精品视频99| 无码人妻久久一区二区三区免费丨 | 国产精品免费看久久久香蕉| 久久久久亚洲AV片无码下载蜜桃| 久久99热狠狠色精品一区| 久久久久久久波多野结衣高潮 |