Compute maximum transport parameter size upfront
Before this change, we used to pick 4096 as our transport parameter size, and hope it would fit. This CL looks at the contents of the transport parameters we are about to send, and programmatically computes the required size. This will ensure that we don't arbitrary fail in the presence of long custom transport parameters.
This CL also tweaks our logging code to truncate overly long custom parameters from the logs.
Every write call in this file will trigger a QUIC_BUG if we run out of space, therefore we are confident that this change will not impact existing behavior, and is therefore not flag-protected.
Refactor, not flag protected.
PiperOrigin-RevId: 312537871
Change-Id: Ia8f2e6c7335f11133545c87173e6a2fc6552161a
2 files changed