The server can change the connection ID with the first Handshake packet.
Afterwards, packets with different source connection IDs have to be
ignored. Otherwise, for example the retransmission of the Initial packet
might create two sessions on the server with different source connection
IDs on the server side, but the same connection ID on the client side.
FHL2 was an experiment in Chrome, run in Q036, which introduced HOL
blocking. This experiment is over, so we can remove the code to send a
PUBLIC_RESET when a peer initiates this experiment.
Instead of exposing a session.handshakeStatus() <-chan error, it's
easier to pass a callback to the session which is called when the
handshake is done.
The removeConnectionID callback is in preparation for IETF QUIC, where a
connection can have multiple connection IDs over its lifetime.
It is not sufficient to check for connection-level window updates every
time a packet is sent. When a connection-level window update needs to be
sent, we need to make sure that it gets sent immediately (i.e. call
scheduleSending() in the session).
There's no need for a check if more than protocol.MaxTrackedSentPackets
packets were sent. There are certain situations where we allow (via
SendingAllowed()) sending of more packets, and we shouldn't throw an
error when the session then actually sends these packets.
This is important because we need to make sure that we can remove old
ACK ranges from the received packet history. The logic we implemented
before was not correct, since we only made sure that every 20th packet
would be retransmittable, but we didn't have any guarantee that this
packet would also contain an ACK frame.
In gQUIC, there's no equivalent to the Finished message in TLS. The
server knows that the handshake is complete when it receives the first
forward-secure packet sent by the client. If the protocol demands that
the server sends the first data, this would never happen. We need to
make sure that the client actually sends such a packet. Queueing a PING
frame is an easy way to do so.