tcp及udp區(qū)別

tcp及udp區(qū)別

ID:21325753

大小:113.32 KB

頁數(shù):5頁

時間:2018-10-21

tcp及udp區(qū)別_第1頁
tcp及udp區(qū)別_第2頁
tcp及udp區(qū)別_第3頁
tcp及udp區(qū)別_第4頁
tcp及udp區(qū)別_第5頁
資源描述:

《tcp及udp區(qū)別》由會員上傳分享,免費在線閱讀,更多相關內容在行業(yè)資料-天天文庫。

1、TCP與UDP區(qū)別TCP---傳輸控制協(xié)議,提供的是面向連接、可靠的字節(jié)流服務。當客戶和服務器彼此交換數(shù)據(jù)前,必須先在雙方之間建立一個TCP連接,之后才能傳輸數(shù)據(jù)。TCP提供超時重發(fā),丟棄重復數(shù)據(jù),檢驗數(shù)據(jù),流量控制等功能,保證數(shù)據(jù)能從一端傳到另一端。UDP---用戶數(shù)據(jù)報協(xié)議,是一個簡單的面向數(shù)據(jù)報的運輸層協(xié)議。UDP不提供可靠性,它只是把應用程序傳給IP層的數(shù)據(jù)報發(fā)送出去,但是并不能保證它們能到達目的地。由于UDP在傳輸數(shù)據(jù)報前不用在客戶和服務器之間建立一個連接,且沒有超時重發(fā)等機制,故而傳輸速度很快

2、OverviewTCP(TransmissionControlProtocol)isthemostcommonlyusedprotocolontheInternet.ThereasonforthisisbecauseTCPofferserrorcorrection.WhentheTCPprotocolisusedthereisa"guaranteeddelivery."Thisisduelargelyinparttoamethodcalled"flowcontrol."Flowcontroldetermi

3、neswhendataneedstobere-sent,andstopstheflowofdatauntilpreviouspacketsaresuccessfullytransferred.Thisworksbecauseifapacketofdataissent,acollisionmayoccur.Whenthishappens,theclientre-requeststhepacketfromtheserveruntilthewholepacketiscompleteandisidenticalt

4、oitsoriginal.UDP(UserDatagramProtocol)isanthercommonlyusedprotocolontheInternet.However,UDPisneverusedtosendimportantdatasuchaswebpages,databaseinformation,etc;UDPiscommonlyusedforstreamingaudioandvideo.StreamingmediasuchasWindowsMediaaudiofiles(.WMA),Rea

5、lPlayer(.RM),andothersuseUDPbecauseitoffersspeed!ThereasonUDPisfasterthanTCPisbecausethereisnoformofflowcontrolorerrorcorrection.ThedatasentovertheInternetisaffectedbycollisions,anderrorswillbepresent.RememberthatUDPisonlyconcernedwithspeed.Thisisthemainr

6、easonwhystreamingmediaisnothighquality.Onthecontrary,UDPhasbeenimplementedamongsometrojanhorseviruses.HackersdevelopscriptsandtrojanstorunoverUDPinordertomasktheiractivities.UDPpacketsarealsousedinDoS(DenialofService)attacks.Itisimportanttoknowthedifferen

7、cebetweenTCPport80andUDPport80.Ifyoudon'tknowwhatportsaregohere.FrameStructureAsdatamovesalonganetwork,variousattributesareaddedtothefiletocreateaframe.Thisprocessiscalledencapsulation.Therearedifferentmethodsofencapsulationdependingonwhichprotocolandtopo

8、logyarebeingused.Asaresult,theframestructureofthesepacketsdifferaswell.TheimagesbelowshowboththeTCPandUDPframestructures.TCPFRAMESTRUCTUREUDPFRAMESTRUCTUREThepayloadfieldcontainstheactuallydata.NoticethatTCPhasamore

當前文檔最多預覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當前文檔最多預覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學公式或PPT動畫的文件,查看預覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權歸屬用戶,天天文庫負責整理代發(fā)布。如果您對本文檔版權有爭議請及時聯(lián)系客服。
3. 下載前請仔細閱讀文檔內容,確認文檔內容符合您的需求后進行下載,若出現(xiàn)內容與標題不符可向本站投訴處理。
4. 下載文檔時可能由于網絡波動等原因無法下載或下載錯誤,付費完成后未能成功下載的用戶請聯(lián)系客服處理。