‘壹’ 鎴戞悳涓涓缃戝潃镞犳硶璁块梾锛屾彁绀烘湭杩炴帴链嶅姟鍣锛
濡傛灉鎭ㄨ緭鍏ョ殑缃戝潃镞犳硶璁块梾骞舵彁绀烘湭杩炴帴链嶅姟鍣锛屽彲鑳芥槸浠ヤ笅铡熷洜涔嬩竴锛
缃戝潃杈揿叆阌栾锛氩彲鑳芥偍杈揿叆镄勭绣鍧涓嶆g‘銆傝峰啀娆℃镆ユ偍杈揿叆镄勭绣鍧鏄钖︽g‘锛岀‘淇濇病链夎緭鍏ラ敊璇镄勫瓧绗︽垨钥呮嫾鍐欓敊璇銆
缃戠粶鏁呴㱩锛氩彲鑳芥槸鐢变簬鎭ㄧ殑缃戠粶鍑虹幇浜嗘晠闅沧垨钥呰繛鎺ラ梾棰樸傛偍鍙浠ュ皾璇曢吨钖鎭ㄧ殑璺鐢卞櫒鎴栬呰皟鏁存偍镄勭绣缁滆剧疆𨱒ヨВ鍐宠繖涓闂棰樸
缃戠珯缁存姢锛氭湁浜涚绣绔椤彲鑳戒细杩涜屽畾链熺淮鎶ゆ垨鍗囩骇锛岃繖镞跺欐偍灏辨棤娉曡块梾璇ョ绣绔欍傝风◢钖庡啀灏濊瘯璁块梾銆
缃戠珯宸插叧闂鎴栦笉瀛桦湪锛氩彲鑳芥槸璇ョ绣绔椤凡缁忓叧闂鎴栦笉瀛桦湪銆傛偍鍙浠ユ悳绱涓涓嬭ョ绣绔欐槸钖﹀凡缁忓叧闂鎴栬呬笉瀛桦湪銆
‘贰’ 娴忚埚櫒浠庤緭鍏URL钖庡埌鍑虹幇椤甸溃锛岃繖涓杩囩▼鍙戠敓浜嗕粈涔堬纻
浜掕仈缃戝彂杈剧殑镞朵唬锛屽綋鎴戜滑阆囧埌浠涔堥梾棰樻椂锛屾讳细涔犳傥镐х殑铡荤绣缁滀笂镆ユ垒绛旀堛傛湰浜轰篃鏄涓镙凤纴寮鍙戞椂阆囧埌闂棰桦氨浼氢範𨱍镐х殑镓揿紑"搴﹀"瀵绘垒鎴戜滑镄勭瓟妗堛
鍝链夋病链夋湅鍙嫔儚鎴戜滑涓镙凤纴涔熶细濂藉囧綋鍓嶆垜浠鍦ㄦ祻瑙埚櫒杈揿叆缃戝潃涔嫔悗锛屾祻瑙埚櫒锅氢简浜涗粈涔埚憿锛
URL 瑙f瀽銆佺紦瀛樻煡璇锛娈NS 瑙f瀽銆乀CP 杩炴帴銆佸勭悊璇锋眰銆佹帴鍙楀搷搴斻佹覆镆挞〉闱
棣栧厛鍒ゆ柇浣犺緭鍏ョ殑鏄涓涓钖堟硶镄 URL 杩樻槸涓涓寰呮悳绱㈢殑鍏抽敭璇嶏纴骞朵笖镙规嵁浣犺緭鍏ョ殑鍐呭硅繘琛岃嚜锷ㄥ畬鎴愬瓧绗︾紪镰佺瓑镎崭綔銆
DNS瑙f瀽锛屾妸锘熷悕杞鍖栨垚IP鍦板潃钖庯纴链嶅姟鍣ㄤ细瀵硅繛鎺ヨ锋眰锅氩嚭鍝嶅簲锛岃〃绀哄悓镒忓缓绔嬭繛鎺ャ
链嶅姟鍣ㄥ紑濮嬫瀯寤哄搷搴旓纴鍒涘缓涓𨱒http鍝嶅簲鎶ユ枃锛屾妸璧勬簮淇℃伅鏀惧埌鍝嶅簲浣挞噷闱㈠紑濮嬭繑锲
http璇锋眰鍝嶅簲锛岄兘链変竴涓鐘舵佺爜杩斿洖锛岀敤𨱒ユ爣璁拌繖娆¤繑锲炵殑鐘舵併备竴鑸链変互涓嫔嚑绉岖姸镐佺爜锛200銆302銆404銆500銆504銆傛祻瑙埚櫒浼氭牴鎹鐘舵佺爜锛屽仛鍑虹浉搴旂殑锷ㄤ綔锛岄亣鍒200浼氭帴鍙楁e父杩斿洖淇℃伅锛屽紑濮嬫覆镆挞〉闱銆傞亣鍒302锛屽垯浼氭牴鎹甴ttp鍝嶅簲澶寸殑location瀛楁碉纴鍐嶆″彂璧蜂竴娆″湴鍧鏄痩ocation镄勭绣缁滆锋眰锛岄亣鍒4寮澶村拰5寮澶寸殑阌栾锛屽垯涓崭细姝e父娓叉煋锛屼细鎻愮ず鐩稿簲镄勯敊璇銆
涓夋℃彙镓嬶纸Three-way Handshake锛夊叾瀹炲氨鏄鎸囧缓绔嬩竴涓猅CP杩炴帴镞讹纴闇瑕佸㈡埛绔鍜屾湇锷″櫒镐诲叡鍙戦3涓鍖呫傝繘琛屼笁娆℃彙镓嬬殑涓昏佷綔鐢ㄥ氨鏄涓轰简纭璁ゅ弻鏂圭殑鎺ユ敹鑳藉姏鍜屽彂阃佽兘锷涙槸钖︽e父銆佹寚瀹氲嚜宸辩殑鍒濆嫔寲搴忓垪鍙蜂负钖庨溃镄勫彲闱犳т紶阃佸仛鍑嗗囥傚疄璐ㄤ笂鍏跺疄灏辨槸杩炴帴链嶅姟鍣ㄦ寚瀹氱鍙o纴寤虹珛TCP杩炴帴锛屽苟钖屾ヨ繛鎺ュ弻鏂圭殑搴忓垪鍙峰拰纭璁ゅ彿锛屼氦鎹TCP绐楀彛澶у皬淇℃伅銆
鍒氩紑濮嫔㈡埛绔澶勪簬 Closed 镄勭姸镐侊纴链嶅姟绔澶勪簬 Listen 鐘舵併
寤虹珛涓涓杩炴帴闇瑕佷笁娆℃彙镓嬶纴钥岀粓姝涓涓杩炴帴瑕佺粡杩囧洓娆℃尌镓嬶纸涔熸湁灏嗗洓娆℃尌镓嫔彨锅氩洓娆℃彙镓嬬殑锛夈傝繖鐢盩CP镄勫崐鍏抽棴锛坔alf-close锛夐犳垚镄勚傛墍璋撶殑鍗婂叧闂锛屽叾瀹炲氨鏄疶CP鎻愪緵浜呜繛鎺ョ殑涓绔鍦ㄧ粨𨱒熷畠镄勫彂阃佸悗杩樿兘鎺ユ敹𨱒ヨ嚜鍙︿竴绔鏁版嵁镄勮兘锷涖
TCP 镄勮繛鎺ョ殑𨰾嗛櫎闇瑕佸彂阃佸洓涓鍖咃纴锲犳ょО涓哄洓娆℃尌镓(Four-way handshake)锛屽㈡埛绔鎴栨湇锷″櫒鍧囧彲涓诲姩鍙戣捣鎸ユ坠锷ㄤ綔銆
鍒氩紑濮嫔弻鏂归兘澶勪簬 ESTABLISHED(寤虹珛) 鐘舵
鍙傝: https://zhuanlan.hu.com/p/86426969
鍙傝: https://www.jianshu.com/p/546b2a175f89