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 #ifndef BLIMP_NET_COMMON_H_ | 5 #ifndef BLIMP_NET_COMMON_H_ |
6 #define BLIMP_NET_COMMON_H_ | 6 #define BLIMP_NET_COMMON_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "blimp/net/blimp_net_export.h" | 12 #include "blimp/net/blimp_net_export.h" |
| 13 #include "net/base/ip_address_number.h" |
13 | 14 |
14 namespace blimp { | 15 namespace blimp { |
15 | 16 |
16 class BlimpMessage; | 17 class BlimpMessage; |
17 | 18 |
18 // TODO(kmarshall): Apply SCIENCE to determine a better constant here. | 19 // TODO(kmarshall): Apply SCIENCE to determine a better constant here. |
19 // See crbug.com/542464 | 20 // See crbug.com/542464 |
20 extern const size_t BLIMP_NET_EXPORT kMaxPacketPayloadSizeBytes; | 21 extern const size_t BLIMP_NET_EXPORT kMaxPacketPayloadSizeBytes; |
21 extern const size_t BLIMP_NET_EXPORT kPacketHeaderSizeBytes; | 22 extern const size_t BLIMP_NET_EXPORT kPacketHeaderSizeBytes; |
22 | 23 |
| 24 // Serializes human-readable BlimpMessage header info, for logging purposes. |
| 25 std::ostream& BLIMP_NET_EXPORT operator<<(std::ostream& out, |
| 26 const BlimpMessage& message); |
| 27 |
23 } // namespace blimp | 28 } // namespace blimp |
24 | 29 |
25 #endif // BLIMP_NET_COMMON_H_ | 30 #endif // BLIMP_NET_COMMON_H_ |
OLD | NEW |