TCP vs UDP on video stream

后端 未结 13 1892
名媛妹妹
名媛妹妹 2020-12-04 05:38

I just came home from my exam in network-programming, and one of the question they asked us was \"If you are going to stream video, would you use TCP or UDP? Give an

13条回答
  •  爱一瞬间的悲伤
    2020-12-04 06:04

    Besides all the other reasons, UDP can use multicast. Supporting 1000s of TCP users all transmitting the same data wastes bandwidth. However, there is another important reason for using TCP.

    TCP can much more easily pass through firewalls and NATs. Depending on your NAT and operator, you may not even be able to receive a UDP stream due to problems with UDP hole punching.

提交回复
热议问题