OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // and regather on those networks. | 92 // and regather on those networks. |
93 static const int DEFAULT_REGATHER_ON_FAILED_NETWORKS_INTERVAL = 5 * 60 * 1000; | 93 static const int DEFAULT_REGATHER_ON_FAILED_NETWORKS_INTERVAL = 5 * 60 * 1000; |
94 | 94 |
95 static constexpr int DEFAULT_BACKUP_CONNECTION_PING_INTERVAL = 25 * 1000; | 95 static constexpr int DEFAULT_BACKUP_CONNECTION_PING_INTERVAL = 25 * 1000; |
96 | 96 |
97 static constexpr int a_is_better = 1; | 97 static constexpr int a_is_better = 1; |
98 static constexpr int b_is_better = -1; | 98 static constexpr int b_is_better = -1; |
99 | 99 |
100 P2PTransportChannel::P2PTransportChannel(const std::string& transport_name, | 100 P2PTransportChannel::P2PTransportChannel(const std::string& transport_name, |
101 int component, | 101 int component, |
| 102 P2PTransport* transport, |
| 103 PortAllocator* allocator) |
| 104 : P2PTransportChannel(transport_name, component, allocator) {} |
| 105 |
| 106 P2PTransportChannel::P2PTransportChannel(const std::string& transport_name, |
| 107 int component, |
102 PortAllocator* allocator) | 108 PortAllocator* allocator) |
103 : TransportChannelImpl(transport_name, component), | 109 : TransportChannelImpl(transport_name, component), |
104 allocator_(allocator), | 110 allocator_(allocator), |
105 network_thread_(rtc::Thread::Current()), | 111 network_thread_(rtc::Thread::Current()), |
106 incoming_only_(false), | 112 incoming_only_(false), |
107 error_(0), | 113 error_(0), |
108 sort_dirty_(false), | 114 sort_dirty_(false), |
109 remote_ice_mode_(ICEMODE_FULL), | 115 remote_ice_mode_(ICEMODE_FULL), |
110 ice_role_(ICEROLE_UNKNOWN), | 116 ice_role_(ICEROLE_UNKNOWN), |
111 tiebreaker_(0), | 117 tiebreaker_(0), |
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2016 | 2022 |
2017 // During the initial state when nothing has been pinged yet, return the first | 2023 // During the initial state when nothing has been pinged yet, return the first |
2018 // one in the ordered |connections_|. | 2024 // one in the ordered |connections_|. |
2019 return *(std::find_if(connections_.begin(), connections_.end(), | 2025 return *(std::find_if(connections_.begin(), connections_.end(), |
2020 [conn1, conn2](Connection* conn) { | 2026 [conn1, conn2](Connection* conn) { |
2021 return conn == conn1 || conn == conn2; | 2027 return conn == conn1 || conn == conn2; |
2022 })); | 2028 })); |
2023 } | 2029 } |
2024 | 2030 |
2025 } // namespace cricket | 2031 } // namespace cricket |
OLD | NEW |