Support GOAWAY in HTTP/3.

Currently the GOAWAY is used and sent in the same way as gQUIC GOAWAY does, which means the content of GOAWAY frame is not used. I will follow up with more CLs to implement the real IETF usage where stream larger than the goaway id is not allowed.

gfe-relnote: protected by disabled v99 flag.
PiperOrigin-RevId: 275339124
Change-Id: I082f579f501b534cce7ef2b83c94dee5a2091e85
diff --git a/quic/core/http/quic_spdy_client_session.cc b/quic/core/http/quic_spdy_client_session.cc
index c6f99ff..da3336d 100644
--- a/quic/core/http/quic_spdy_client_session.cc
+++ b/quic/core/http/quic_spdy_client_session.cc
@@ -53,6 +53,9 @@
     QUIC_DLOG(INFO) << "Encryption not active so no outgoing stream created.";
     return false;
   }
+  bool goaway_received = VersionUsesHttp3(transport_version())
+                             ? http3_goaway_received()
+                             : QuicSession::goaway_received();
   if (!GetQuicReloadableFlag(quic_use_common_stream_check) &&
       !VersionHasIetfQuicFrames(transport_version())) {
     if (GetNumOpenOutgoingStreams() >=
@@ -61,14 +64,14 @@
                       << "Already " << GetNumOpenOutgoingStreams() << " open.";
       return false;
     }
-    if (goaway_received() && respect_goaway_) {
+    if (goaway_received && respect_goaway_) {
       QUIC_DLOG(INFO) << "Failed to create a new outgoing stream. "
                       << "Already received goaway.";
       return false;
     }
     return true;
   }
-  if (goaway_received() && respect_goaway_) {
+  if (goaway_received && respect_goaway_) {
     QUIC_DLOG(INFO) << "Failed to create a new outgoing stream. "
                     << "Already received goaway.";
     return false;
@@ -132,7 +135,10 @@
     QUIC_BUG << "ShouldCreateIncomingStream called when disconnected";
     return false;
   }
-  if (goaway_received() && respect_goaway_) {
+  bool goaway_received = quic::VersionUsesHttp3(transport_version())
+                             ? http3_goaway_received()
+                             : QuicSession::goaway_received();
+  if (goaway_received && respect_goaway_) {
     QUIC_DLOG(INFO) << "Failed to create a new outgoing stream. "
                     << "Already received goaway.";
     return false;