gpt4 book ai didi

TCP——确认

转载 作者:可可西里 更新时间:2023-11-01 02:33:57 25 4
gpt4 key购买 nike

TCP header 上的 32 位确认字段,比如 x告诉另一台主机“我收到了所有字节,直到并包括 x-1,现在期待来自 x 和 on 的字节”。在这种情况下,接收方可能已经收到了一些更多字节,比如 x+100 到 x+180,但它还没有收到第 x 个字节。

有没有一种情况,虽然接收方还没有收到x 到 x+100 个字节,但接收到的字节是 x+100 到 x+180,接收方确认它收到了 x+180?

我读到的一个资源表明,尽管较早的字节存在间隙,但仍确认接收到的字节。然而,所有其他消息来源都告诉

“x 的确认告诉所有字节,直到收到 x-1”。

有没有异常(exception)情况?我正在寻找验证这一点。

TIA。

最佳答案

这可以通过称为 SACK 的 TCP 选项来实现。

在这里,客户端可以通过重复的 ACK 表示它只有特定的数据包编号 2(数据包的序列号),并为接收到的连续数据包范围附加 SACK(选择性确认)选项,如编号为 4 的数据包到5(序号)。反过来,这将使服务器能够仅重新传输客户端未收到的数据包(3 序列号)。

下面提供了 RFC 2018 的摘录:TCP 选择性确认选项

The SACK option is to be sent by a data receiver to inform the data sender of non-contiguous blocks of data that have been received and
queued. The data receiver awaits the receipt of data (perhaps by
means of retransmissions) to fill the gaps in sequence space between
received blocks. When missing segments are received, the data
receiver acknowledges the data normally by advancing the left window
edge in the Acknowledgement Number Field of the TCP header. The SACK option does not change the meaning of the Acknowledgement Number
field.

关于TCP——确认,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33245804/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com