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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 int receiving_timeout() const { return receiving_timeout_; } | 152 int receiving_timeout() const { return receiving_timeout_; } |
153 int check_receiving_delay() const { return check_receiving_delay_; } | 153 int check_receiving_delay() const { return check_receiving_delay_; } |
154 | 154 |
155 // Helper method used only in unittest. | 155 // Helper method used only in unittest. |
156 rtc::DiffServCodePoint DefaultDscpValue() const; | 156 rtc::DiffServCodePoint DefaultDscpValue() const; |
157 | 157 |
158 // Public for unit tests. | 158 // Public for unit tests. |
159 Connection* FindNextPingableConnection(); | 159 Connection* FindNextPingableConnection(); |
160 | 160 |
| 161 // Public for unit tests. |
| 162 const std::vector<Connection*>& connections() const { return connections_; } |
| 163 |
161 private: | 164 private: |
162 rtc::Thread* thread() { return worker_thread_; } | 165 rtc::Thread* thread() { return worker_thread_; } |
163 PortAllocatorSession* allocator_session() { | 166 PortAllocatorSession* allocator_session() { |
164 return allocator_sessions_.back(); | 167 return allocator_sessions_.back(); |
165 } | 168 } |
166 | 169 |
167 // A transport channel is weak if the current best connection is either | 170 // A transport channel is weak if the current best connection is either |
168 // not receiving or not writable, or if there is no best connection at all. | 171 // not receiving or not writable, or if there is no best connection at all. |
169 bool weak() const; | 172 bool weak() const; |
170 void UpdateConnectionStates(); | 173 void UpdateConnectionStates(); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 uint32_t last_ping_sent_ms_ = 0; | 258 uint32_t last_ping_sent_ms_ = 0; |
256 bool gather_continually_ = false; | 259 bool gather_continually_ = false; |
257 int weak_ping_delay_ = WEAK_PING_DELAY; | 260 int weak_ping_delay_ = WEAK_PING_DELAY; |
258 | 261 |
259 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 262 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
260 }; | 263 }; |
261 | 264 |
262 } // namespace cricket | 265 } // namespace cricket |
263 | 266 |
264 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 267 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |