Why does a SYN or FIN bit in a TCP segment consume

2019-03-14 09:11发布

I am trying to understand the rationale behind such a design. I skimmed through a few RFCs but did not find anything obvious.

2条回答
走好不送
2楼-- · 2019-03-14 09:52

SYNs and FINs require acknowledgement, thus they increment the stream's sequence number by one when used.

查看更多
来,给爷笑一个
3楼-- · 2019-03-14 10:00

It's not particularly subtle - it's so that the SYN and FIN bits themselves can be acknowledged (and therefore re-sent if they're lost).

For example, if the connection is closed without sending any more data, then if the FIN did not consume a sequence number the closing end couldn't tell the difference between an ACK for the FIN, and an ACK for the data that was sent prior to the FIN.

查看更多
登录 后发表回答