36 if (localEndpoint.address().is_v4()) {
37 mtu = std::numeric_limits<uint16_t>::max();
38 mtu -=
sizeof(uint32_t) * ((1 << 4) - 1);
41 mtu = std::numeric_limits<uint16_t>::max();
43 mtu -=
sizeof(uint16_t) * 4;
ssize_t computeMtu(const Endpoint &localEndpoint)
Computes the maximum payload size in a UDP packet.
boost::asio::ip::udp::endpoint Endpoint