You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to understand UDP better. I know there is a max Datagram size, 65,507 byte for ipv4.
The question is that, if I send one data package below this size, is it always guaranteed to arrive at the receiver as one piece?
For example, i send exactly 10,000 bytes (below the datagram size limit). Is it always going to be this exact 10,000 bytes arriving at the receiver side? I know that UDP is not guaranteeing that a package cannot get lost, neither the proper sending order of different datagrams. This is not an issue for me. But I would like to know, if I can always expect the same datagram if it arrives.
I understand that at lower levels, there might be fragmentations, driver level things, driver assembling the parts, basic checksum check, etc. I do not care. What I care about, at the OS/C# level, whether I can expect always the same datagram or not?
The motivation: I wonder if I could neglect data frame leading marker/ending marker of the messages. If I know that I always get the exact same 10,000 bytes, I can be sure that the data is at the proper positions in it. No need to re-assembling like in the case of a RS232 datastream between an embedded PIC and PC for example...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Folks!
I am trying to understand UDP better. I know there is a max Datagram size, 65,507 byte for ipv4.
The question is that, if I send one data package below this size, is it always guaranteed to arrive at the receiver as one piece?
For example, i send exactly 10,000 bytes (below the datagram size limit). Is it always going to be this exact 10,000 bytes arriving at the receiver side? I know that UDP is not guaranteeing that a package cannot get lost, neither the proper sending order of different datagrams. This is not an issue for me. But I would like to know, if I can always expect the same datagram if it arrives.
I understand that at lower levels, there might be fragmentations, driver level things, driver assembling the parts, basic checksum check, etc. I do not care. What I care about, at the OS/C# level, whether I can expect always the same datagram or not?
The motivation: I wonder if I could neglect data frame leading marker/ending marker of the messages. If I know that I always get the exact same 10,000 bytes, I can be sure that the data is at the proper positions in it. No need to re-assembling like in the case of a RS232 datastream between an embedded PIC and PC for example...
Thanks! :)
Beta Was this translation helpful? Give feedback.
All reactions