Why Does RTP use UDP instead of TCP?

前端 未结 11 1406
南旧
南旧 2020-12-24 07:28

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.

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-24 07:44

    UDP is often used for various types of realtime traffic that doesn't need strict ordering to be useful. This is because TCP enforces an ordering before passing data to an application (by default, you can get around this by setting the URG pointer, but no one seems to ever do this) and that can be highly undesirable in an environment where you'd rather get current realtime data than get old data reliably.

提交回复
热议问题