OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 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 13 matching lines...) Expand all Loading... |
24 | 24 |
25 namespace rtc { | 25 namespace rtc { |
26 class Thread; | 26 class Thread; |
27 } | 27 } |
28 | 28 |
29 namespace cricket { | 29 namespace cricket { |
30 | 30 |
31 class TransportController : public sigslot::has_slots<>, | 31 class TransportController : public sigslot::has_slots<>, |
32 public rtc::MessageHandler { | 32 public rtc::MessageHandler { |
33 public: | 33 public: |
| 34 // If |redetermine_role_on_ice_restart| is true, ICE role is redetermined |
| 35 // upon setting a local transport description that indicates an ICE restart. |
| 36 // For the constructor that doesn't take this parameter, it defaults to true. |
| 37 TransportController(rtc::Thread* signaling_thread, |
| 38 rtc::Thread* network_thread, |
| 39 PortAllocator* port_allocator, |
| 40 bool redetermine_role_on_ice_restart); |
| 41 |
34 TransportController(rtc::Thread* signaling_thread, | 42 TransportController(rtc::Thread* signaling_thread, |
35 rtc::Thread* network_thread, | 43 rtc::Thread* network_thread, |
36 PortAllocator* port_allocator); | 44 PortAllocator* port_allocator); |
37 | 45 |
38 virtual ~TransportController(); | 46 virtual ~TransportController(); |
39 | 47 |
40 rtc::Thread* signaling_thread() const { return signaling_thread_; } | 48 rtc::Thread* signaling_thread() const { return signaling_thread_; } |
41 rtc::Thread* network_thread() const { return network_thread_; } | 49 rtc::Thread* network_thread() const { return network_thread_; } |
42 | 50 |
43 PortAllocator* port_allocator() const { return port_allocator_; } | 51 PortAllocator* port_allocator() const { return port_allocator_; } |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12; | 221 rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12; |
214 | 222 |
215 // Aggregate state for TransportChannelImpls. | 223 // Aggregate state for TransportChannelImpls. |
216 IceConnectionState connection_state_ = kIceConnectionConnecting; | 224 IceConnectionState connection_state_ = kIceConnectionConnecting; |
217 bool receiving_ = false; | 225 bool receiving_ = false; |
218 IceGatheringState gathering_state_ = kIceGatheringNew; | 226 IceGatheringState gathering_state_ = kIceGatheringNew; |
219 | 227 |
220 // TODO(deadbeef): Move the fields below down to the transports themselves | 228 // TODO(deadbeef): Move the fields below down to the transports themselves |
221 IceConfig ice_config_; | 229 IceConfig ice_config_; |
222 IceRole ice_role_ = ICEROLE_CONTROLLING; | 230 IceRole ice_role_ = ICEROLE_CONTROLLING; |
| 231 bool redetermine_role_on_ice_restart_; |
223 uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); | 232 uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); |
224 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; | 233 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; |
225 rtc::AsyncInvoker invoker_; | 234 rtc::AsyncInvoker invoker_; |
226 // True if QUIC is used instead of DTLS. | 235 // True if QUIC is used instead of DTLS. |
227 bool quic_ = false; | 236 bool quic_ = false; |
228 }; | 237 }; |
229 | 238 |
230 } // namespace cricket | 239 } // namespace cricket |
231 | 240 |
232 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ | 241 #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
OLD | NEW |