OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file defines some basic types used by the P2P-related IPC | 5 // This file defines some basic types used by the P2P-related IPC |
6 // messages. | 6 // messages. |
7 | 7 |
8 #ifndef CONTENT_COMMON_P2P_SOCKET_TYPE_H_ | 8 #ifndef CONTENT_COMMON_P2P_SOCKET_TYPE_H_ |
9 #define CONTENT_COMMON_P2P_SOCKET_TYPE_H_ | 9 #define CONTENT_COMMON_P2P_SOCKET_TYPE_H_ |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 uint64_t packet_id = 0; | 64 uint64_t packet_id = 0; |
65 // rtc_packet_id is a sequential packet counter written in the RTP header and | 65 // rtc_packet_id is a sequential packet counter written in the RTP header and |
66 // used by RTP receivers to ACK received packets. It is sent back with a | 66 // used by RTP receivers to ACK received packets. It is sent back with a |
67 // corresponding send time to WebRTC in the browser process so that it can be | 67 // corresponding send time to WebRTC in the browser process so that it can be |
68 // combined with ACKs to compute inter-packet delay variations. | 68 // combined with ACKs to compute inter-packet delay variations. |
69 int32_t rtc_packet_id = -1; | 69 int32_t rtc_packet_id = -1; |
70 base::TimeTicks send_time; | 70 base::TimeTicks send_time; |
71 }; | 71 }; |
72 | 72 |
| 73 // Struct that carries a port range. |
| 74 struct P2PPortRange { |
| 75 P2PPortRange() : P2PPortRange(0, 0) {} |
| 76 P2PPortRange(uint16_t min_port, uint16_t max_port) |
| 77 : min_port(min_port), max_port(max_port) { |
| 78 DCHECK_LE(min_port, max_port); |
| 79 DCHECK((min_port == 0 && max_port == 0) || min_port > 0); |
| 80 } |
| 81 uint16_t min_port; |
| 82 uint16_t max_port; |
| 83 }; |
| 84 |
73 } // namespace content | 85 } // namespace content |
74 | 86 |
75 #endif // CONTENT_COMMON_P2P_SOCKET_TYPE_H_ | 87 #endif // CONTENT_COMMON_P2P_SOCKET_TYPE_H_ |
OLD | NEW |