What would cause UDP packets to be dropped when being sent to localhost?

后端 未结 5 1647
死守一世寂寞
死守一世寂寞 2020-11-29 05:23

I\'m sending very large (64000 bytes) datagrams. I realize that the MTU is much smaller than 64000 bytes (a typical value is around 1500 bytes, from my reading), but I would

5条回答
  •  我在风中等你
    2020-11-29 05:58

    Your expectations, as expressed in your question and in numerous comments to other answers, are wrong. All the following can happen even in the absence of routers and cables.

    1. If you send a packet to any receiver and there is no room in his socket receive buffer it will get dropped.

    2. If you send a UDP datagram larger than the path MTU it will get fragmented into smaller packets, which are subject to (1).

    3. If all the packets of a datagram don't arrive, the datagram will never get delivered.

    4. The TCP/IP stack has no obligation to deliver packets or UDP datagrams in order.

提交回复
热议问题