OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "blimp/net/common.h" | 5 #include "blimp/net/common.h" |
6 | 6 |
7 #include <iostream> | |
8 | |
9 #include "blimp/common/proto/blimp_message.pb.h" | |
10 #include "net/base/ip_address_number.h" | |
11 | |
7 namespace blimp { | 12 namespace blimp { |
8 | 13 |
9 const size_t kMaxPacketPayloadSizeBytes = 1 << 16; // 64KB | 14 const size_t kMaxPacketPayloadSizeBytes = 1 << 16; // 64KB |
10 const size_t kPacketHeaderSizeBytes = 4; | 15 const size_t kPacketHeaderSizeBytes = 4; |
11 | 16 |
17 std::ostream& operator<<(std::ostream& out, const BlimpMessage& message) { | |
18 // TODO(kmarshall): Log type-specific contextual detail. | |
haibinlu
2016/01/04 21:17:12
how do you get contextual detail?
| |
19 out << "<BlimpMessage type=" << message.type() | |
20 << ", size=" << message.ByteSize() << ">"; | |
21 return out; | |
22 } | |
23 | |
12 } // namespace blimp | 24 } // namespace blimp |
OLD | NEW |