Adopt QuicConnectionDebugVisitor from quic_client_interop_test
This CL refactors quic_client_interop_test into a class to allow adopting QuicConnectionDebugVisitor which improves the tool's reporting of the C and V letters.
gfe-relnote: n/a, test-tool-only
PiperOrigin-RevId: 293104152
Change-Id: I36c50bc44a7187ccb35437ec1b617b1d922faabc
diff --git a/quic/tools/quic_client_base.h b/quic/tools/quic_client_base.h
index 3160b74..91a9587 100644
--- a/quic/tools/quic_client_base.h
+++ b/quic/tools/quic_client_base.h
@@ -213,6 +213,11 @@
crypto_config_.set_pre_shared_key(key);
}
+ void set_connection_debug_visitor(
+ QuicConnectionDebugVisitor* connection_debug_visitor) {
+ connection_debug_visitor_ = connection_debug_visitor;
+ }
+
protected:
// TODO(rch): Move GetNumSentClientHellosFromSession and
// GetNumReceivedServerConfigUpdatesFromSession into a new/better
@@ -331,6 +336,10 @@
// The network helper used to create sockets and manage the event loop.
// Not owned by this class.
std::unique_ptr<NetworkHelper> network_helper_;
+
+ // The debug visitor set on the connection right after it is constructed.
+ // Not owned, must be valid for the lifetime of the QuicClientBase instance.
+ QuicConnectionDebugVisitor* connection_debug_visitor_;
};
} // namespace quic