Refactor QuicDispatcher connection ID replacement

Historically, QuicDispatcher needed the ability to generate a new distinct connection ID for the purpose of QUIC_CRYPTO stateless rejects. Due to how stateless rejects were designed, they needed a new connection ID distinct from the current one, but that still routes to the same server instance. For that reason, QuicDispatcher::GenerateNewServerConnectionId would just hash the connection ID and GfeQuicDispatcher::GenerateNewServerConnectionId would just add 1 to the lowest order bit. However, since then, stateless rejects have been deprecated and entirely removed from the codebase. Separately, we started using GenerateNewServerConnectionId to truncate client-provided connection IDs that were too long. Additionally, with cl/311115671 we no longer increment the connection ID by one because we no longer have the requirement of it being different.

All of this to say that the code no longer matches what it is used for, and this CL refactors it to make it clearer, without changing any behavior.

Refactor, no behavior change, not flag protected

PiperOrigin-RevId: 311788800
Change-Id: I44c16f2fc91babb0607159a4d1f2e580ec17317c
7 files changed
tree: acebae90c098431a98a998acea195f41cc7d28c0
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects.