Why does UDP have a length field in the header and TCP does not?

前端 未结 4 1178
清酒与你
清酒与你 2021-02-01 04:21

Why does UDP have a length field in the header and TCP does not?

I am guessing that the length of the segment in TCP is inferred from the IP header but one should be abl

4条回答
  •  庸人自扰
    2021-02-01 04:23

    I thought: As TCP is a stream based protocol, it's ok if its segment be fragmented at . UDP is transaction oriented, if its messages be fragmented at IP layer we need its length to recover it.

    Sorry for my poor English.

提交回复
热议问题