maxPacketSize has already subtracted UDP headers length. Thanks Eleriseth.