Chromium Code Reviews| Index: blimp/net/common.cc |
| diff --git a/blimp/net/common.cc b/blimp/net/common.cc |
| index 1663b300534f03ff610710b6d2630a5f7c04c427..7f66fce021280d40efde02117e82c4a23ba822c0 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): Log type-specific contextual detail. |
|
haibinlu
2016/01/04 21:17:12
how do you get contextual detail?
|
| + out << "<BlimpMessage type=" << message.type() |
| + << ", size=" << message.ByteSize() << ">"; |
| + return out; |
| +} |
| + |
| } // namespace blimp |