UDP fragmentation
Dave Higton (1515) 3534 posts |
What happens, in RISC OS, if a UDP packet is fragmented? Does the RISC OS app see each fragment separately, or are the data returned to the calling app when the fragments have been reassembled? Multicast DNS is done via UDP. A query is sent out, and all the responses can be expected to arrive within a short timespan. If the calling app only sees fragments, that might be a nightmare to reassemble because messages from different sources might be temporally interleaved; the fragmentation and reassembly are carried out at IP level, i.e. below UDP. If the RISC OS calling app only receives fully reassembled datagrams, that makes it easy. (As an aside, I recall working on SIP years ago, in aan application where datagrams were often big enough that they had to be fragmented. The very well known C# library that we used, failed to reassemble them correctly due to a bug in the code. Just one byte of every fragmented message would be corrupted.) |