为什么RTP使用UDP而不是TCP? [英] Why Does RTP use UDP instead of TCP?

查看:783
本文介绍了为什么RTP使用UDP而不是TCP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道为什么在RTP中使用UDP而不是TCP?当我入侵了某些VoIP OSS时,主要的VoIP工具仅使用UDP.

I wanted to know why UDP is used in RTP rather than TCP ?. Major VoIP Tools used only UDP as i hacked some of the VoIP OSS.

推荐答案

正如DJ所指出的,TCP旨在获得可靠的数据流,并且将减慢传输速度并重新传输损坏的数据包,以实现这一目标.

As DJ pointed out, TCP is about getting a reliable data stream, and will slow down transmission, and re-transmit corrupted packets, in order to achieve that.

UDP不关心通信的可靠性,并且不会减慢或重新传输数据.

UDP does not care about reliability of the communication, and will not slow down or re-transmit data.

例如,如果您的应用程序需要可靠的数据流,以从Web服务器检索文件,则选择TCP.

If your application needs a reliable data stream, for example, to retrieve a file from a webserver, you choose TCP.

如果您的应用程序不关心损坏或丢失的数据包,并且您无需承担额外的开销来提供更高的可靠性,则可以选择UDP.

If your application doesn't care about corrupted or lost packets, and you don't need to incur the additional overhead to provide the additional reliability, you can choose UDP instead.

可靠的分组传输并没有显着改善VOIP,实际上,在某些情况下,TCP中的诸如重传和指数退缩之类的事情实际上会损害VOIP的质量.因此,UDP是一个更好的选择.

VOIP is not significantly improved by reliable packet transmission, and in fact, in some cases things in TCP like retransmission and exponential backoff can actually hurt VOIP quality. Therefore, UDP was a better choice.

这篇关于为什么RTP使用UDP而不是TCP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆