Home > other >  [for] just began to learn the computer network, on the choice of the TCP/UDP
[for] just began to learn the computer network, on the choice of the TCP/UDP

Time:10-30

Everybody is good, just contact with the computer network, a lot of things very confused,

Would like to ask two questions:

1. YOUTUBE as an application of video playback, why the TCP transport protocol, and not the UDP transport protocol?

2. When the client and server to transfer a large file, the more is cut into small packets or less packets of the transmission efficiency will be higher?

Thank you very much!! This is the teacher in class to ask two questions ~ ~

CodePudding user response:

1. If the video interrupted, finish video data didn't pass? How did the UDP continue to transfer data?
2. In theory, of course, if you can one-time to transmit a packet to destination safety score packet transmission is fast, because the subcontract transmission every packet must carry a packet header,
But, subcontract transmission can improve the efficiency of data retransmission packet loss, and also can improve the efficiency of data validation,
Overall, or subcontract transmission more reliable,

CodePudding user response:

1. Choose the TCP protocol, because TCP is a reliable transmission, packet loss occurs in the data the result of the retransmission on certification, and UDP is not reliable transmission, may because the data packet loss led to video Mosaic

2. Not very clear, intuition should be divided into small packets for transmission

CodePudding user response:

1. Network status is good, of course can use UDP, but not every local network status is good, it is with reliable transmission can ensure the quality of video
2. The little and big bag is more efficient, more packets, baotou load proportion will increase, if is TCP, also need to send the reply back pack, takes up more bandwidth

CodePudding user response:

1. TCP to ensure reliable transmission, not because of packet loss or error in transmission process and cause the client data is incomplete, (retransmission, window, etc.) for the live video (practical results), mostly choose TCP to ensure the quality of transmission; For the class live video, mostly adopts the UDP to guarantee the transmission of real-time, some lost packets,
2. For large TCP packets, be sure to break up, in the TCP/IP protocol, packet each passed to the lower level will increase first, Ethernet and data link layer provides the frame data section (IP packets) in 46 - the total length of 1500 bytes, so usually large files will be split into to the link layer, the data is 1500 bytes,

P.s. : I have learned is confined to a "TCP/IP, volume I," if the answer wrong, please forgive me,

CodePudding user response:

Big New Year's day digging a grave...
Youtube if use udp, you visit him easily, he will back it won't be easy video to you, is one of the advantages of TCP connection
  • Related