Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: content/common/p2p_socket_type.h

Issue 2140693002: Support port range for IPC P2P UDP sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and remove unused constructor from test Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/p2p_messages.h ('k') | content/renderer/p2p/ipc_socket_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « content/common/p2p_messages.h ('k') | content/renderer/p2p/ipc_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698