MASQUE interop changes for IETF 110 hackathon
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index e3b0408..bdc9ef5 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -25,6 +25,7 @@
 #include "quic/platform/api/quic_ptr_util.h"
 #include "quic/platform/api/quic_server_stats.h"
 #include "quic/platform/api/quic_stack_trace.h"
+#include "common/platform/api/quiche_text_utils.h"
 
 using spdy::SpdyPriority;
 
@@ -368,8 +369,11 @@
 }
 
 void QuicSession::OnMessageReceived(absl::string_view message) {
-  QUIC_DVLOG(1) << ENDPOINT << "Received message, length: " << message.length()
-                << ", " << message;
+  QUIC_DVLOG(1) << ENDPOINT << "Received message of length "
+                << message.length();
+  QUIC_DVLOG(2) << ENDPOINT << "Contents of message of length "
+                << message.length() << ":" << std::endl
+                << quiche::QuicheTextUtils::HexDump(message);
 }
 
 void QuicSession::OnHandshakeDoneReceived() {
diff --git a/quic/masque/masque_server_bin.cc b/quic/masque/masque_server_bin.cc
index 17fee23..d5a5d9f 100644
--- a/quic/masque/masque_server_bin.cc
+++ b/quic/masque/masque_server_bin.cc
@@ -14,6 +14,7 @@
 #include "quic/platform/api/quic_flags.h"
 #include "quic/platform/api/quic_logging.h"
 #include "quic/platform/api/quic_socket_address.h"
+#include "quic/platform/api/quic_system_event_loop.h"
 
 DEFINE_QUIC_COMMAND_LINE_FLAG(int32_t,
                               port,
@@ -42,6 +43,7 @@
                               "open and legacy. Defaults to open.");
 
 int main(int argc, char* argv[]) {
+  QuicSystemEventLoop event_loop("masque_server");
   const char* usage = "Usage: masque_server [options]";
   std::vector<std::string> non_option_args =
       quic::QuicParseCommandLineFlags(usage, argc, argv);
diff --git a/quic/masque/masque_utils.cc b/quic/masque/masque_utils.cc
index 17dec0d..cd19602 100644
--- a/quic/masque/masque_utils.cc
+++ b/quic/masque/masque_utils.cc
@@ -8,17 +8,16 @@
 
 ParsedQuicVersionVector MasqueSupportedVersions() {
   QuicVersionInitializeSupportForIetfDraft();
-  ParsedQuicVersion version = UnsupportedQuicVersion();
-  for (const ParsedQuicVersion& vers : AllSupportedVersions()) {
-    // Find the first version that supports IETF QUIC.
-    if (vers.HasIetfQuicFrames() && vers.UsesTls()) {
-      version = vers;
-      break;
+  ParsedQuicVersionVector versions;
+  for (const ParsedQuicVersion& version : AllSupportedVersions()) {
+    // Use all versions that support IETF QUIC.
+    if (version.UsesHttp3()) {
+      QuicEnableVersion(version);
+      versions.push_back(version);
     }
   }
-  QUICHE_CHECK(version.IsKnown());
-  QuicEnableVersion(version);
-  return {version};
+  QUICHE_CHECK(!versions.empty());
+  return versions;
 }
 
 QuicConfig MasqueEncapsulatedConfig() {
diff --git a/quic/tools/quic_server_bin.cc b/quic/tools/quic_server_bin.cc
index 6ed8e99..c971367 100644
--- a/quic/tools/quic_server_bin.cc
+++ b/quic/tools/quic_server_bin.cc
@@ -9,10 +9,12 @@
 
 #include "quic/core/quic_versions.h"
 #include "quic/platform/api/quic_flags.h"
+#include "quic/platform/api/quic_system_event_loop.h"
 #include "quic/tools/quic_epoll_server_factory.h"
 #include "quic/tools/quic_toy_server.h"
 
 int main(int argc, char* argv[]) {
+  QuicSystemEventLoop event_loop("quic_server");
   const char* usage = "Usage: quic_server [options]";
   std::vector<std::string> non_option_args =
       quic::QuicParseCommandLineFlags(usage, argc, argv);