Receiving data in TCP

前端 未结 10 1257
借酒劲吻你
借酒劲吻你 2020-12-18 04:59

If i send 1000 bytes in TCP, does it guarantee that the receiver will get the entire 1000 bytes \"togther\"? or perhaps he will first only get 500 bytes, and later he\'ll re

10条回答
  •  清酒与你
    2020-12-18 05:44

    The IP packets may get fragmented during retransmission.

    So the destination machine may receive multiple packets - which will be reassembled back by TCP/IP stack. Depending on the network API you are using - the data will be given to you either reassembled or in RAW packets.

提交回复
热议问题