博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Difference between UDP and TCP
阅读量:5362 次
发布时间:2019-06-15

本文共 2434 字,大约阅读时间需要 8 分钟。

What is the difference between UDP and TCP internet protocols?

by  on MAY 15, 2007 · · last updated at DECEMBER 16, 2007

Q. Can you explain the difference between UDP and TCP internet protocol (IP) traffic and its usage with an example?

A. Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)is a transportation protocol that is one of the core protocols of the Internet protocol suite. Both TCP and UDP work at transport layer TCP/IP model and both have very different usage.

Difference between TCP and UDP

TCP UDP
Reliability: TCP is connection-oriented protocol. When a file or message send it will get delivered unless connections fails. If connection lost, the server will request the lost part. There is no corruption while transferring a message. Reliability: UDP is connectionless protocol. When you a send a data or message, you don't know if it'll get there, it could get lost on the way. There may be corruption while transferring a message.
Ordered: If you send two messages along a connection, one after the other, you know the first message will get there first. You don't have to worry about data arriving in the wrong order. Ordered: If you send two messages out, you don't know what order they'll arrive in i.e. no ordered
Heavyweight: - when the low level parts of the TCP "stream" arrive in the wrong order, resend requests have to be sent, and all the out of sequence parts have to be put back together, so requires a bit of work to piece together. Lightweight: No ordering of messages, no tracking connections, etc. It's just fire and forget! This means it's a lot quicker, and the network card / OS have to do very little work to translate the data back from the packets.
Streaming: Data is read as a "stream," with nothing distinguishing where one packet ends and another begins. There may be multiple packets per read call. Datagrams: Packets are sent individually and are guaranteed to be whole if they arrive. One packet per one read call.
Examples: World Wide Web (Apache TCP port 80), e-mail (SMTP TCP port 25 Postfix MTA), File Transfer Protocol (FTP port 21) and Secure Shell (OpenSSH port 22) etc. Examples: Domain Name System (DNS UDP port 53), streaming media applications such as IPTV or movies, Voice over IP (VoIP), Trivial File Transfer Protocol (TFTP) and online multiplayer games etc

Further readings

转载于:https://www.cnblogs.com/simonhaninmelbourne/archive/2013/05/07/3065624.html

你可能感兴趣的文章
IOS常用分类Category
查看>>
判断大学生体侧项目中立定跳远成绩的等级
查看>>
利用localtime_s函数格式化输出当地日期与时间
查看>>
[UE4]寻找敌人
查看>>
Nginx增加错误日志配置
查看>>
细说多线程处理上
查看>>
Android界面性能分析及优化
查看>>
BZOJ.2208.[JSOI2010]连通数(bitset Tarjan 拓扑)
查看>>
计算机组成系统
查看>>
别忘记给你博客的windows live writer配置 ping服务
查看>>
王爽《汇编语言》(第三版)实验9解析
查看>>
用CSS画三角形
查看>>
《跟我一起做J2EE版Blog–jPress》7(前端设计,第一个博客主题)
查看>>
linux初级学习笔记三:linux操作系统及常用命令,及如何复制和移动文件!(视频序号:02_4)...
查看>>
手机数据抓包入门教程
查看>>
比特币网络的弱点(二)
查看>>
Android 设置TextView字体颜色
查看>>
BZOJ1858: [Scoi2010]序列操作
查看>>
BZOJ4419: [Shoi2013]发微博
查看>>
HZK16应用实例
查看>>