A http packet is very large and is divided into multiple tcp packages in the tcp layer. If a tcp packet is lost, will the application layer read the http request?

A http packet is very large and will be segmented in the tcp layer, that is, it will be divided into multiple tcp packages. If one of the tcp packets is lost and the retransmission fails, will the application layer read the http request?

Mar.10,2022

< H2 > tcp is a reliable connection, how do you understand the word "reliable"? < / H2 >

supplementary answer.

the answer is yes, but you may only be able to read part of it, depending on where the missing package is located.

specifically, the data provided by tcp to the upper layer must be arranged in order. For example, if there are a total of 12345 packets, assuming that the size of the first three packets can fill the tcp buffer, then if the fourth packet is lost, it will not affect the application layer to receive the first three packets. If there is a loss in the first three packets, even if 4 / 5 is received normally, because there are still packets that have not been received, tcp will not provide data to the upper layer.

The key to this is to understand the tcp buffer and the sequence assurance mechanism provided by tcp (which is also an aspect of reliability).

Menu