| 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, | |
| 108 PortAllocator* allocator) | 102 PortAllocator* allocator) |
| 109 : TransportChannelImpl(transport_name, component), | 103 : TransportChannelImpl(transport_name, component), |
| 110 allocator_(allocator), | 104 allocator_(allocator), |
| 111 network_thread_(rtc::Thread::Current()), | 105 network_thread_(rtc::Thread::Current()), |
| 112 incoming_only_(false), | 106 incoming_only_(false), |
| 113 error_(0), | 107 error_(0), |
| 114 sort_dirty_(false), | 108 sort_dirty_(false), |
| 115 remote_ice_mode_(ICEMODE_FULL), | 109 remote_ice_mode_(ICEMODE_FULL), |
| 116 ice_role_(ICEROLE_UNKNOWN), | 110 ice_role_(ICEROLE_UNKNOWN), |
| 117 tiebreaker_(0), | 111 tiebreaker_(0), |
| (...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 | 2016 |
| 2023 // During the initial state when nothing has been pinged yet, return the first | 2017 // During the initial state when nothing has been pinged yet, return the first |
| 2024 // one in the ordered |connections_|. | 2018 // one in the ordered |connections_|. |
| 2025 return *(std::find_if(connections_.begin(), connections_.end(), | 2019 return *(std::find_if(connections_.begin(), connections_.end(), |
| 2026 [conn1, conn2](Connection* conn) { | 2020 [conn1, conn2](Connection* conn) { |
| 2027 return conn == conn1 || conn == conn2; | 2021 return conn == conn1 || conn == conn2; |
| 2028 })); | 2022 })); |
| 2029 } | 2023 } |
| 2030 | 2024 |
| 2031 } // namespace cricket | 2025 } // namespace cricket |
| OLD | NEW |