Index: blimp/net/common.cc |
diff --git a/blimp/net/common.cc b/blimp/net/common.cc |
index 1663b300534f03ff610710b6d2630a5f7c04c427..c4f01483cecb028ee7bbd7cbe11bd206edbc67b6 100644 |
--- a/blimp/net/common.cc |
+++ b/blimp/net/common.cc |
@@ -4,9 +4,21 @@ |
#include "blimp/net/common.h" |
+#include <iostream> |
+ |
+#include "blimp/common/proto/blimp_message.pb.h" |
+#include "net/base/ip_address_number.h" |
+ |
namespace blimp { |
const size_t kMaxPacketPayloadSizeBytes = 1 << 16; // 64KB |
const size_t kPacketHeaderSizeBytes = 4; |
+std::ostream& operator<<(std::ostream& out, const BlimpMessage& message) { |
+ // TODO(kmarshall): Look into including type-specific fields in the output. |
+ out << "<BlimpMessage type=" << message.type() |
+ << ", size=" << message.ByteSize() << ">"; |
+ return out; |
+} |
+ |
} // namespace blimp |