Reputation: 5717
After reading dozens of articles I can't find an answer to a simple question - can UDP datagram arrive fragmented? I know that it can get fragmented on the way if it's size is above 576 bytes or something like that, but will it get merged when it arrives?
In other words, if I send a single packet via udp::socket::send_to()
, can I assume that if it's not dropped on the way, I'll retrieve it by a single call to udp::socket::async_receive_from()
?
Upvotes: 2
Views: 1094
Reputation: 123320
The OS network stack will reassemble the fragments and give the user space the complete packet. And if one of the fragments get lost the user space will not receive the rest, but nothing.
Upvotes: 7