L
L
LoliDeveloper2021-06-24 21:31:15
C++ / C#
LoliDeveloper, 2021-06-24 21:31:15

Why can't I send a datagram with size 65516, but I can with 65000?

I googled that the maximum datagram size is 65535, but I cannot send a datagram with a size of 65516. It is clearly visible through the debugger that a datagram with a length of 65516 bytes is sent at the time of sending. What's the matter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ananiev, 2021-06-24
@LoliDeveloper


The length of the datagram.
A field that specifies the length of the entire datagram (header and data) in bytes. The minimum length is equal to the length of the header - 8 bytes. Theoretically, the maximum field size is 65535 bytes for a UDP datagram (8 bytes for header and 65527 for data). The actual data length limit when using IPv4 is 65507 (in addition to the 8 bytes per UDP header, another 20 bytes per IP header are required).

https://ru.m.wikipedia.org/wiki/UDP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question