1. 程式人生 > >(轉)理論經典:TCP協議的3次握手與4次揮手過程詳解

(轉)理論經典:TCP協議的3次握手與4次揮手過程詳解

<div id="article_content" class="article_content clearfix csdn-tracking-statistics" data-pid="blog" data-mod="popu_307" data-dsm="post">
								            <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-e4c7a3727d.css">
						<div class="htmledit_views">
                
<div class="blog-abstract">摘要: 本文將分別講解經典的TCP協議建立連線(所謂的“3次握手”)和斷開連線(所謂的“4次揮手”)的過程。</div>
<div class="blog-body" id="blogBody">
<div class="BlogContent"><span id="OSC_h1_1"></span>
<h1 id="h1_0"><a name="t0"></a>1、前言</h1>
<p>儘管TCP和UDP都使用相同的網路層(IP),TCP卻嚮應用層提供與UDP完全不同的服務。TCP提供一種面向連線的、可靠的位元組流服務。<br><br>
面向連線意味著兩個使用TCP的應用(通常是一個客戶和一個伺服器)在彼此交換資料之前必須先建立一個TCP連線。這一過程與打電話很相似,先撥號振鈴,等待對方摘機說“喂”,然後才說明是誰。<br><br><span>本文將分別講解經典的TCP協議建立連線(所謂的“3次握手”)和斷開連線(所謂的“4次揮手”)的過程</span>。有關TCP協議的權威理論介紹,請參見《<a href="http://www.52im.net/topic-tcpipvol1.html" rel="nofollow" target="_blank">TCP/IP詳解</a>》這本書。<span>(本文同步釋出於:</span><a href="http://www.52im.net/thread-258-1-1.html" rel="nofollow" target="_blank">http://www.52im.net/thread-258-1-1.html</a><span>)</span></p>
<span id="OSC_h1_2"></span>
<h1 id="h1_1"><a name="t1"></a>2、學習交流&nbsp;</h1>
<p>- 即時通訊開發交流群:<span><img alt="" src="http://images2015.cnblogs.com/blog/848699/201607/848699-20160715181415061-1759908109.png">&nbsp;</span><a href="http://shang.qq.com/wpa/qunwpa?idkey=4cc788473d261129ab3ded26fbb22168d0fa52c799d28f92a8f193dc36865bcb" rel="nofollow" target="_blank">215891622</a>&nbsp;[推薦]</p>
<p>- 移動端IM開發推薦文章:《<a href="http://www.52im.net/thread-464-1-1.html" rel="nofollow" target="_blank">新手入門一篇就夠:從零開發移動端IM</a>》</p>
<span id="OSC_h1_3"></span>
<h1 id="h1_2"><a name="t2"></a>3、相關資料</h1>
<p>《<a href="http://www.52im.net/thread-520-1-1.html" rel="nofollow" target="_blank">技術往事:改變世界的TCP/IP協議(珍貴多圖、手機慎點)</a>》<br>
《<a href="http://www.52im.net/topic-tcpipvol1.html" rel="nofollow" target="_blank">TCP/IP詳解</a>&nbsp;-&nbsp;<a href="http://docs.52im.net/extend/docs/book/tcpip/vol1/17/" rel="nofollow" target="_blank">第17章·TCP:傳輸控制協議</a>》<br>
《<a href="http://www.52im.net/topic-tcpipvol1.html" rel="nofollow" target="_blank">TCP/IP詳解</a>&nbsp;-&nbsp;<a href="http://docs.52im.net/extend/docs/book/tcpip/vol1/18/" rel="nofollow" target="_blank">第18章·TCP連線的建立與終止</a>》<br>
《<a href="http://www.52im.net/topic-tcpipvol1.html" rel="nofollow" target="_blank">TCP/IP詳解</a>&nbsp;-&nbsp;<a href="http://docs.52im.net/extend/docs/book/tcpip/vol1/21/" rel="nofollow" target="_blank">第21章·TCP的超時與重傳</a>》<br>
《<a href="http://www.52im.net/thread-513-1-1.html" rel="nofollow" target="_blank">通俗易懂-深入理解TCP協議(上):理論基礎</a>》<br>
《<a href="http://www.52im.net/thread-515-1-1.html" rel="nofollow" target="_blank">通俗易懂-深入理解TCP協議(下):RTT、滑動視窗、擁塞處理</a>》<br>
《<a href="http://www.52im.net/thread-258-1-1.html" rel="nofollow" target="_blank">理論經典:TCP協議的3次握手與4次揮手過程詳解</a>》<br>
《<a href="http://www.52im.net/thread-180-1-1.html" rel="nofollow" target="_blank">計算機網路通訊協議關係圖(中文珍藏版)</a>》</p>
<span id="OSC_h1_4"></span>
<h1 id="h1_3"><a name="t3"></a>4、先來認識TCP報文格式</h1>
<p>TCP/IP協議的詳細資訊參看《<a href="http://www.52im.net/topic-tcpipvol1.html" rel="nofollow" target="_blank">TCP/IP 協議詳解</a>》中有關TCP格式的章節(<a href="http://docs.52im.net/extend/docs/book/tcpip/vol1/17/#h17_3" rel="nofollow" target="_blank">點此檢視《TCP/IP詳解
 線上版》</a>)。<br><br><span>下面是TCP報文格式圖:</span><br>
&nbsp;<img alt="" height="168" src="https://static.oschina.net/uploads/space/2016/0926/165516_55IW_737747.png" width="383"><br>
&nbsp;<br><span>上圖中有幾個欄位需要重點介紹下:</span><br>
(1)序號:Seq序號,佔32位,用來標識從TCP源端向目的端傳送的位元組流,發起方傳送資料時對此進行標記。<br>
(2)確認序號:Ack序號,佔32位,只有ACK標誌位為1時,確認序號欄位才有效,Ack=Seq+1。<br>
(3)標誌位:共6個,即URG、ACK、PSH、RST、SYN、FIN等,具體含義如下:<br>
&nbsp; &nbsp;&nbsp; &nbsp; (A)URG:緊急指標(urgent pointer)有效。<br>
&nbsp; &nbsp;&nbsp; &nbsp; (B)ACK:確認序號有效。<br>
&nbsp; &nbsp;&nbsp; &nbsp; (C)PSH:接收方應該儘快將這個報文交給應用層。<br>
&nbsp; &nbsp;&nbsp; &nbsp; (D)RST:重置連線。<br>
&nbsp; &nbsp;&nbsp; &nbsp; (E)SYN:發起一個新連線。<br>
&nbsp; &nbsp;&nbsp; &nbsp; (F)FIN:釋放一個連線。<br><br><span>需要注意的是:</span><br>
(A)不要將確認序號Ack與標誌位中的ACK搞混了。<br>
(B)確認方Ack=發起方Req+1,兩端配對。&nbsp;</p>
<span id="OSC_h1_5"></span>
<h1 id="h1_4"><a name="t4"></a>5、3次握手過程詳解</h1>
<p>所謂三次握手(Three-Way Handshake)即建立TCP連線,就是指建立一個TCP連線時,需要客戶端和服務端總共傳送3個包以確認連線的建立。在socket程式設計中,這一過程由客戶端執行connect來觸發,整個流程如下圖所示:</p>
<p><br><img alt="" src="https://static.oschina.net/uploads/space/2016/0926/165533_NFJu_737747.png"><br>
&nbsp;<br><span>(1)第一次握手:</span><br>
Client將標誌位SYN置為1,隨機產生一個值seq=J,並將該資料包傳送給Server,Client進入SYN_SENT狀態,等待Server確認。<br><br><span>(2)第二次握手:</span><br>
Server收到資料包後由標誌位SYN=1知道Client請求建立連線,Server將標誌位SYN和ACK都置為1,ack=J+1,隨機產生一個值seq=K,並將該資料包傳送給Client以確認連線請求,Server進入SYN_RCVD狀態。<br><br><span>(3)第三次握手:</span><br>
Client收到確認後,檢查ack是否為J+1,ACK是否為1,如果正確則將標誌位ACK置為1,ack=K+1,並將該資料包傳送給Server,Server檢查ack是否為K+1,ACK是否為1,如果正確則連線建立成功,Client和Server進入ESTABLISHED狀態,完成三次握手,隨後Client與Server之間可以開始傳輸資料了。<br><br><span>SYN攻擊:</span><br><br>
在三次握手過程中,Server傳送SYN-ACK之後,收到Client的ACK之前的TCP連線稱為半連線(half-open connect),此時Server處於SYN_RCVD狀態,當收到ACK後,Server轉入ESTABLISHED狀態。SYN攻擊就是Client在短時間內偽造大量不存在的IP地址,並向Server不斷地傳送SYN包,Server回覆確認包,並等待Client的確認,由於源地址是不存在的,因此,Server需要不斷重發直至超時,這些偽造的SYN包將產時間佔用未連線佇列,導致正常的SYN請求因為佇列滿而被丟棄,從而引起網路堵塞甚至系統癱瘓。SYN攻擊時一種典型的DDOS攻擊,檢測SYN攻擊的方式非常簡單,即當Server上有大量半連線狀態且源IP地址是隨機的,則可以斷定遭到SYN攻擊了,使用如下命令可以讓之現行:</p>
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td>
<p>1</p>
</td>
<td>
<p><code>#netstat -nap | grep SYN_RECV</code></p>
</td>
</tr></tbody></table><span id="OSC_h1_6"></span>
<h1 id="h1_5"><a name="t5"></a>6、4次揮手過程詳解</h1>
<p>三次握手耳熟能詳,四次揮手估計就少有人知道了。所謂四次揮手(Four-Way Wavehand)即終止TCP連線,就是指斷開一個TCP連線時,需要客戶端和服務端總共傳送4個包以確認連線的斷開。在socket程式設計中,這一過程由客戶端或服務端任一方執行close來觸發,整個流程如下圖所示:<br><br>
&nbsp;<img alt="" height="323" src="https://static.oschina.net/uploads/space/2016/0926/165553_emXw_737747.png" width="507"><br><br>
由於TCP連線時全雙工的,因此,每個方向都必須要單獨進行關閉,這一原則是當一方完成資料傳送任務後,傳送一個FIN來終止這一方向的連線,收到一個FIN只是意味著這一方向上沒有資料流動了,即不會再收到資料了,但是在這個TCP連線上仍然能夠傳送資料,直到這一方向也傳送了FIN。首先進行關閉的一方將執行主動關閉,而另一方則執行被動關閉,上圖描述的即是如此。</p>
<ul><li><span>第一次揮手:</span><br>
Client傳送一個FIN,用來關閉Client到Server的資料傳送,Client進入FIN_WAIT_1狀態。</li><li><span>第二次揮手:</span><br>
Server收到FIN後,傳送一個ACK給Client,確認序號為收到序號+1(與SYN相同,一個FIN佔用一個序號),Server進入CLOSE_WAIT狀態。</li><li><span>第三次揮手:</span><br>
Server傳送一個FIN,用來關閉Server到Client的資料傳送,Server進入LAST_ACK狀態。</li><li><span>第四次揮手:</span><br>
Client收到FIN後,Client進入TIME_WAIT狀態,接著傳送一個ACK給Server,確認序號為收到序號+1,Server進入CLOSED狀態,完成四次揮手。</li></ul><p>上面是一方主動關閉,另一方被動關閉的情況,實際中還會出現同時發起主動關閉的情況,具體流程如下圖:<br><br><img alt="" height="191" src="https://static.oschina.net/uploads/space/2016/0926/165608_mu6k_737747.png" width="503"><br><br>
流程和狀態在上圖中已經很明瞭了,在此不再贅述,可以參考前面的四次揮手解析步驟。</p>
<span id="OSC_h1_7"></span>
<h1 id="h1_6"><a name="t6"></a>7、結語</h1>
<p><span>關於三次握手與四次揮手通常都會有典型的面試題,在此提出供有需求的XDJM們參考:</span></p>
<ul><li>(1) 三次握手是什麼或者流程?四次握手呢?答案前面分析就是。</li><li>(2) 為什麼建立連線是三次握手,而關閉連線卻是四次揮手呢?</li></ul><p>這是因為服務端在LISTEN狀態下,收到建立連線請求的SYN報文後,把ACK和SYN放在一個報文裡傳送給客戶端。而關閉連線時,當收到對方的FIN報文時,僅僅表示對方不再發送資料了但是還能接收資料,己方也未必全部資料都發送給對方了,所以己方可以立即close,也可以傳送一些資料給對方後,再發送FIN報文給對方來表示同意現在關閉連線,因此,己方ACK和FIN一般都會分開發送。</p>
<p><span>(本文同步釋出於:</span><a href="http://www.52im.net/thread-258-1-1.html" rel="nofollow" target="_blank">http://www.52im.net/thread-258-1-1.html</a><span>)</span></p>
<span id="OSC_h1_8"></span>
<h1 id="h1_7"><a name="t7"></a>附錄:更多IM技術文章</h1>
<p><span>[1] 網路程式設計基礎資料:</span><br>
《<a href="http://www.52im.net/thread-50-1-1.html" rel="nofollow" target="_blank">NAT詳解:基本原理、穿越技術(P2P打洞)、埠老化等</a>》<br>
《<a href="http://www.52im.net/thread-29-1-1.html" rel="nofollow" target="_blank">UDP中一個包的大小最大能多大?</a>》<br>
《<a href="http://www.52im.net/thread-306-1-1.html" rel="nofollow" target="_blank">Java新一代網路程式設計模型AIO原理及Linux系統AIO介紹</a>》<br>
《<a href="http://www.52im.net/thread-378-1-1.html" rel="nofollow" target="_blank">NIO框架入門(三):iOS與MINA2、Netty4的跨平臺UDP雙向通訊實戰</a>》<br>
《<a href="http://www.52im.net/thread-388-1-1.html" rel="nofollow" target="_blank">NIO框架入門(四):Android與MINA2、Netty4的跨平臺UDP雙向通訊實戰</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=9" rel="nofollow" target="_blank">更多同類文章 ……</a><br><br><span>[2] 有關IM/推送的通訊格式、協議的選擇:</span><br>
《<a href="http://www.52im.net/thread-279-1-1.html" rel="nofollow" target="_blank">為什麼QQ用的是UDP協議而不是TCP協議?</a>》<br>
《<a href="http://www.52im.net/thread-33-1-1.html" rel="nofollow" target="_blank">移動端即時通訊協議選擇:UDP還是TCP?</a>》<br>
《<a href="http://www.52im.net/thread-276-1-1.html" rel="nofollow" target="_blank">如何選擇即時通訊應用的資料傳輸格式</a>》<br>
《<a href="http://www.52im.net/thread-277-1-1.html" rel="nofollow" target="_blank">強列建議將Protobuf作為你的即時通訊應用資料傳輸格式</a>》<br>
《<a href="http://www.52im.net/thread-133-1-1.html" rel="nofollow" target="_blank">移動端IM開發需要面對的技術問題(含通訊協議選擇)</a>》<br>
《<a href="http://www.52im.net/thread-289-1-1.html" rel="nofollow" target="_blank">簡述移動端IM開發的那些坑:架構設計、通訊協議和客戶端</a>》<br>
《<a href="http://www.52im.net/thread-283-1-1.html" rel="nofollow" target="_blank">理論聯絡實際:一套典型的IM通訊協議設計詳解</a>》<br>
《<a href="http://www.52im.net/thread-298-1-1.html" rel="nofollow" target="_blank">58到家實時訊息系統的協議設計等技術實踐分享</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=18" rel="nofollow" target="_blank">更多同類文章 ……</a><br><br><span>[3] 有關IM/推送的心跳保活處理:</span><br>
《<a href="http://www.52im.net/thread-438-1-1.html" rel="nofollow" target="_blank">Android程序保活詳解:一篇文章解決你的所有疑問</a>》<br>
《<a href="http://www.52im.net/thread-341-1-1.html" rel="nofollow" target="_blank">Android端訊息推送總結:實現原理、心跳保活、遇到的問題等</a>》<br>
《<a href="http://www.52im.net/thread-281-1-1.html" rel="nofollow" target="_blank">為何基於TCP協議的移動端IM仍然需要心跳保活機制?</a>》<br>
《<a href="http://www.52im.net/thread-210-1-1.html" rel="nofollow" target="_blank">微信團隊原創分享:Android版微信後臺保活實戰分享(程序保活篇)</a>》<br>
《<a href="http://www.52im.net/thread-209-1-1.html" rel="nofollow" target="_blank">微信團隊原創分享:Android版微信後臺保活實戰分享(網路保活篇)</a>》<br>
《<a href="http://www.52im.net/thread-120-1-1.html" rel="nofollow" target="_blank">移動端IM實踐:實現Android版微信的智慧心跳機制</a>》<br>
《<a href="http://www.52im.net/thread-121-1-1.html" rel="nofollow" target="_blank">移動端IM實踐:WhatsApp、Line、微信的心跳策略分析</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=17" rel="nofollow" target="_blank">更多同類文章 ……</a><br><br><span>[4] 有關WEB端即時通訊開發:</span><br>
《<a href="http://www.52im.net/thread-338-1-1.html" rel="nofollow" target="_blank">新手入門貼:史上最全Web端即時通訊技術原理詳解</a>》<br>
《<a href="http://www.52im.net/thread-336-1-1.html" rel="nofollow" target="_blank">Web端即時通訊技術盤點:短輪詢、Comet、Websocket、SSE</a>》<br>
《<a href="http://www.52im.net/thread-335-1-1.html" rel="nofollow" target="_blank">SSE技術詳解:一種全新的HTML5伺服器推送事件技術</a>》<br>
《<a href="http://www.52im.net/thread-334-1-1.html" rel="nofollow" target="_blank">Comet技術詳解:基於HTTP長連線的Web端實時通訊技術</a>》<br>
《<a href="http://www.52im.net/thread-331-1-1.html" rel="nofollow" target="_blank">WebSocket詳解(一):初步認識WebSocket技術</a>》<br>
《<a href="http://www.52im.net/thread-188-1-1.html" rel="nofollow" target="_blank">socket.io實現訊息推送的一點實踐及思路</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=15" rel="nofollow" target="_blank">更多同類文章 ……</a><br><br><span>[5] 有關IM架構設計:</span><br>
《<a href="http://www.52im.net/thread-307-1-1.html" rel="nofollow" target="_blank">淺談IM系統的架構設計</a>》<br>
《<a href="http://www.52im.net/thread-289-1-1.html" rel="nofollow" target="_blank">簡述移動端IM開發的那些坑:架構設計、通訊協議和客戶端</a>》<br>
《<a href="http://www.52im.net/thread-151-1-1.html" rel="nofollow" target="_blank">一套原創分散式即時通訊(IM)系統理論架構方案</a>》<br>
《<a href="http://www.52im.net/thread-152-1-1.html" rel="nofollow" target="_blank">從零到卓越:京東客服即時通訊系統的技術架構演進歷程</a>》<br>
《<a href="http://www.52im.net/thread-31-1-1.html" rel="nofollow" target="_blank">蘑菇街即時通訊/IM伺服器開發之架構選擇</a>》<br>
《<a href="http://www.52im.net/thread-158-1-1.html" rel="nofollow" target="_blank">騰訊QQ1.4億線上使用者的技術挑戰和架構演進之路PPT</a>》<br>
《<a href="http://www.52im.net/thread-200-1-1.html" rel="nofollow" target="_blank">微信技術總監談架構:微信之道——大道至簡(演講全文)</a>》<br>
《<a href="http://www.52im.net/thread-201-1-1.html" rel="nofollow" target="_blank">如何解讀《微信技術總監談架構:微信之道——大道至簡》</a>》<br>
《<a href="http://www.52im.net/thread-168-1-1.html" rel="nofollow" target="_blank">快速裂變:見證微信強大後臺架構從0到1的演進歷程(一)</a>》<br>
《<a href="http://www.52im.net/thread-159-1-1.html" rel="nofollow" target="_blank">17年的實踐:騰訊海量產品的技術方法論</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=7" rel="nofollow" target="_blank">更多同類文章 ……</a><br><br><span>[6] 有關IM安全的文章:</span><br>
《<a href="http://www.52im.net/thread-216-1-1.html" rel="nofollow" target="_blank">即時通訊安全篇(一):正確地理解和使用Android端加密演算法</a>》<br>
《<a href="http://www.52im.net/thread-217-1-1.html" rel="nofollow" target="_blank">即時通訊安全篇(二):探討組合加密演算法在IM中的應用</a>》<br>
《<a href="http://www.52im.net/thread-219-1-1.html" rel="nofollow" target="_blank">即時通訊安全篇(三):常用加解密演算法與通訊安全講解</a>》<br>
《<a href="http://www.52im.net/thread-312-1-1.html" rel="nofollow" target="_blank">即時通訊安全篇(四):例項分析Android中金鑰硬編碼的風險</a>》<br>
《<a href="http://www.52im.net/thread-327-1-1.html" rel="nofollow" target="_blank">傳輸層安全協議SSL/TLS的Java平臺實現簡介和Demo演示</a>》<br>
《<a href="http://www.52im.net/thread-283-1-1.html" rel="nofollow" target="_blank">理論聯絡實際:一套典型的IM通訊協議設計詳解(含安全層設計)</a>》<br>
《<a href="http://www.52im.net/thread-310-1-1.html" rel="nofollow" target="_blank">微信新一代通訊安全解決方案:基於TLS1.3的MMTLS詳解</a>》<br>
《<a href="http://www.52im.net/thread-215-1-1.html" rel="nofollow" target="_blank">來自阿里OpenIM:打造安全可靠即時通訊服務的技術實踐分享</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=6" rel="nofollow" target="_blank">更多同類文章 ……</a><br><br><span>[7] 有關實時音視訊開發:</span><br>
《<a href="http://www.52im.net/thread-228-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(一):視訊編解碼之理論概述</a>》<br>
《<a href="http://www.52im.net/thread-229-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(二):視訊編解碼之數字視訊介紹</a>》<br>
《<a href="http://www.52im.net/thread-232-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(三):視訊編解碼之編碼基礎</a>》<br>
《<a href="http://www.52im.net/thread-235-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(四):視訊編解碼之預測技術介紹</a>》<br>
《<a href="http://www.52im.net/thread-237-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(五):認識主流視訊編碼技術H.264</a>》<br>
《<a href="http://www.52im.net/thread-241-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(六):如何開始音訊編解碼技術的學習</a>》<br>
《<a href="http://www.52im.net/thread-242-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(七):音訊基礎及編碼原理入門</a>》<br>
《<a href="http://www.52im.net/thread-243-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(八):常見的實時語音通訊編碼標準</a>》<br>
《<a href="http://www.52im.net/thread-247-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(九):實時語音通訊的迴音及迴音消除概述</a>》<br>
《<a href="http://www.52im.net/thread-250-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(十):實時語音通訊的迴音消除技術詳解</a>》<br>
《<a href="http://www.52im.net/thread-251-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(十一):實時語音通訊丟包補償技術詳解</a>》<br>
《<a href="http://www.52im.net/thread-253-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(十二):多人實時音視訊聊天架構探討</a>》<br>
《<a href="http://www.52im.net/thread-266-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(十三):實時視訊編碼H.264的特點與優勢</a>》<br>
《<a href="http://www.52im.net/thread-267-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(十四):實時音視訊資料傳輸協議介紹</a>》<br>
《<a href="http://www.52im.net/thread-269-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(十五):聊聊P2P與實時音視訊的應用情況</a>》<br>
《<a href="http://www.52im.net/thread-270-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(十六):移動端實時音視訊開發的幾個建議</a>》<br>
《<a href="http://www.52im.net/thread-274-1-1.html" rel="nofollow" target="_blank">即時通訊音視訊開發(十七):視訊編碼H.264、V8的前世今生</a>》<br>
《<a href="http://www.52im.net/thread-225-1-1.html" rel="nofollow" target="_blank">簡述開源實時音視訊技術WebRTC的優缺點</a>》<br>
《<a href="http://www.52im.net/thread-265-1-1.html" rel="nofollow" target="_blank">良心分享:WebRTC 零基礎開發者教程(中文)</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=4" rel="nofollow" target="_blank">更多同類文章 ……</a><br><br><span>[8] IM開發綜合文章:</span><br>
《<a href="http://www.52im.net/thread-133-1-1.html" rel="nofollow" target="_blank">移動端IM開發需要面對的技術問題</a>》<br>
《<a href="http://www.52im.net/thread-150-1-1.html" rel="nofollow" target="_blank">開發IM是自己設計協議用位元組流好還是字元流好?</a>》<br>
《<a href="http://www.52im.net/thread-175-1-1.html" rel="nofollow" target="_blank">請問有人知道語音留言聊天的主流實現方式嗎?</a>》<br>
《<a href="http://www.52im.net/thread-294-1-1.html" rel="nofollow" target="_blank">IM系統中如何保證訊息的可靠投遞(即QoS機制)</a>》<br>
《<a href="http://www.52im.net/thread-282-1-1.html" rel="nofollow" target="_blank">談談移動端 IM 開發中登入請求的優化</a>》<br>
《<a href="http://www.52im.net/thread-280-1-1.html" rel="nofollow" target="_blank">完全自已開發的IM該如何設計“失敗重試”機制?</a>》<br>
《<a href="http://www.52im.net/thread-195-1-1.html" rel="nofollow" target="_blank">微信對網路影響的技術試驗及分析(論文全文)</a>》<br>
《<a href="http://www.52im.net/thread-218-1-1.html" rel="nofollow" target="_blank">即時通訊系統的原理、技術和應用(技術論文)</a>》<br>
《<a href="http://www.52im.net/thread-447-1-1.html" rel="nofollow" target="_blank">開源IM工程“蘑菇街TeamTalk”的現狀:一場有始無終的開源秀</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=10" rel="nofollow" target="_blank">更多同類文章 ……</a>&nbsp;<br><br><span>[9] 開源移動端IM技術框架資料:</span><br>
《<a href="http://www.52im.net/thread-52-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:快速入門</a>》<br>
《<a href="http://www.52im.net/thread-60-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:常見問題解答</a>》<br>
《<a href="http://www.52im.net/thread-57-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:壓力測試報告</a>》<br>
《<a href="http://www.52im.net/thread-55-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:Android版Demo使用幫助</a>》<br>
《<a href="http://www.52im.net/thread-56-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:Java版Demo使用幫助</a>》<br>
《<a href="http://www.52im.net/thread-54-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:iOS版Demo使用幫助</a>》<br>
《<a href="http://www.52im.net/thread-61-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:Android客戶端開發指南</a>》<br>
《<a href="http://www.52im.net/thread-59-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:Java客戶端開發指南</a>》<br>
《<a href="http://www.52im.net/thread-62-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:iOS客戶端開發指南</a>》<br>
《<a href="http://www.52im.net/thread-63-1-1.html" rel="nofollow" target="_blank">開源移動端IM技術框架MobileIMSDK:Server端開發指南</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=1" rel="nofollow" target="_blank">更多同類文章 ……</a><br><br><span>[10] 有關推送技術的文章:</span><br>
《<a href="http://www.52im.net/thread-345-1-1.html" rel="nofollow" target="_blank">iOS的推送服務APNs詳解:設計思路、技術原理及缺陷等</a>》<br>
《<a href="http://www.52im.net/thread-341-1-1.html" rel="nofollow" target="_blank">Android端訊息推送總結:實現原理、心跳保活、遇到的問題等</a>》<br>
《<a href="http://www.52im.net/thread-318-1-1.html" rel="nofollow" target="_blank">掃盲貼:認識MQTT通訊協議</a>》<br>
《<a href="http://www.52im.net/thread-315-1-1.html" rel="nofollow" target="_blank">一個基於MQTT通訊協議的完整Android推送Demo</a>》<br>
《<a href="http://www.52im.net/thread-314-1-1.html" rel="nofollow" target="_blank">求教android訊息推送:GCM、XMPP、MQTT三種方案的優劣</a>》<br>
《<a href="http://www.52im.net/thread-288-1-1.html" rel="nofollow" target="_blank">移動端實時訊息推送技術淺析</a>》<br>
《<a href="http://www.52im.net/thread-286-1-1.html" rel="nofollow" target="_blank">掃盲貼:淺談iOS和Android後臺實時訊息推送的原理和區別</a>》<br>
《<a href="http://www.52im.net/thread-166-1-1.html" rel="nofollow" target="_blank">絕對乾貨:基於Netty實現海量接入的推送服務技術要點</a>》<br>
《<a href="http://www.52im.net/thread-122-1-1.html" rel="nofollow" target="_blank">移動端IM實踐:谷歌訊息推送服務(GCM)研究(來自微信)</a>》<br>
《<a href="http://www.52im.net/thread-117-1-1.html" rel="nofollow" target="_blank">為何微信、QQ這樣的IM工具不使用GCM服務推送訊息?</a>》<br>
&gt;&gt;&nbsp;<a href="http://www.52im.net/forum.php?mod=collection&amp;action=view&amp;ctid=11" rel="nofollow" target="_blank">更多同類文章 ……</a><br><br><span>[11] 更多即時通訊技術好文分類:</span><br><a href="http://www.52im.net/forum.php?mod=collection&amp;op=all" rel="nofollow" target="_blank">http://www.52im.net/forum.php?mod=collection&amp;op=all</a></p>
<blockquote>
<p><span>作者:</span><a href="https://github.com/JackJiang2011" rel="nofollow" target="_blank">Jack Jiang</a>&nbsp;(點選作者姓名進入Github)&nbsp;<br><span>出處:</span><a href="http://www.52im.net/space-uid-1.html" rel="nofollow" target="_blank">http://www.52im.net/space-uid-1.html</a>&nbsp;</p>
</blockquote>
</div>
</div>
            </div>
                </div>