tcp及udp区别

tcp及udp区别

ID:21325753

大小:113.32 KB

页数:5页

时间:2018-10-21

tcp及udp区别_第1页
tcp及udp区别_第2页
tcp及udp区别_第3页
tcp及udp区别_第4页
tcp及udp区别_第5页
资源描述:

《tcp及udp区别》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、TCP与UDP区别TCP---传输控制协议,提供的是面向连接、可靠的字节流服务。当客户和服务器彼此交换数据前,必须先在双方之间建立一个TCP连接,之后才能传输数据。TCP提供超时重发,丢弃重复数据,检验数据,流量控制等功能,保证数据能从一端传到另一端。UDP---用户数据报协议,是一个简单的面向数据报的运输层协议。UDP不提供可靠性,它只是把应用程序传给IP层的数据报发送出去,但是并不能保证它们能到达目的地。由于UDP在传输数据报前不用在客户和服务器之间建立一个连接,且没有超时重发等机制,故而传输速度很快

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. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。