deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
| 12 | #define WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |
| 13 | |
| 14 | #include <map> |
jbauch | 555604a | 2016-04-26 03:13:22 -0700 | [diff] [blame] | 15 | #include <memory> |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 16 | #include <string> |
| 17 | #include <vector> |
| 18 | |
Honghai Zhang | 7fb69db | 2016-03-14 11:59:18 -0700 | [diff] [blame] | 19 | #include "webrtc/base/asyncinvoker.h" |
deadbeef | 62802a1 | 2016-12-13 16:38:36 -0800 | [diff] [blame] | 20 | #include "webrtc/base/constructormagic.h" |
| 21 | #include "webrtc/base/refcountedobject.h" |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 22 | #include "webrtc/base/sigslot.h" |
| 23 | #include "webrtc/base/sslstreamadapter.h" |
| 24 | #include "webrtc/p2p/base/candidate.h" |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 25 | #include "webrtc/p2p/base/dtlstransportchannel.h" |
| 26 | #include "webrtc/p2p/base/jseptransport.h" |
| 27 | #include "webrtc/p2p/base/p2ptransportchannel.h" |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 28 | |
| 29 | namespace rtc { |
| 30 | class Thread; |
deadbeef | 5bd5ca3 | 2017-02-10 11:31:50 -0800 | [diff] [blame^] | 31 | class PacketTransportInternal; |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 32 | } |
Honghai Zhang | d93f50c | 2016-10-05 11:47:22 -0700 | [diff] [blame] | 33 | namespace webrtc { |
| 34 | class MetricsObserverInterface; |
| 35 | } |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 36 | |
| 37 | namespace cricket { |
| 38 | |
| 39 | class TransportController : public sigslot::has_slots<>, |
| 40 | public rtc::MessageHandler { |
| 41 | public: |
Taylor Brandstetter | f0bb360 | 2016-08-26 20:59:24 -0700 | [diff] [blame] | 42 | // If |redetermine_role_on_ice_restart| is true, ICE role is redetermined |
| 43 | // upon setting a local transport description that indicates an ICE restart. |
| 44 | // For the constructor that doesn't take this parameter, it defaults to true. |
| 45 | TransportController(rtc::Thread* signaling_thread, |
| 46 | rtc::Thread* network_thread, |
| 47 | PortAllocator* port_allocator, |
| 48 | bool redetermine_role_on_ice_restart); |
| 49 | |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 50 | TransportController(rtc::Thread* signaling_thread, |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 51 | rtc::Thread* network_thread, |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 52 | PortAllocator* port_allocator); |
| 53 | |
| 54 | virtual ~TransportController(); |
| 55 | |
| 56 | rtc::Thread* signaling_thread() const { return signaling_thread_; } |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 57 | rtc::Thread* network_thread() const { return network_thread_; } |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 58 | |
| 59 | PortAllocator* port_allocator() const { return port_allocator_; } |
| 60 | |
| 61 | // Can only be set before transports are created. |
| 62 | // TODO(deadbeef): Make this an argument to the constructor once BaseSession |
| 63 | // and WebRtcSession are combined |
| 64 | bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version); |
| 65 | |
honghaiz | 1f429e3 | 2015-09-28 07:57:34 -0700 | [diff] [blame] | 66 | void SetIceConfig(const IceConfig& config); |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 67 | void SetIceRole(IceRole ice_role); |
| 68 | |
deadbeef | d1a38b5 | 2016-12-10 13:15:33 -0800 | [diff] [blame] | 69 | // Set the "needs-ice-restart" flag as described in JSEP. After the flag is |
| 70 | // set, offers should generate new ufrags/passwords until an ICE restart |
| 71 | // occurs. |
| 72 | void SetNeedsIceRestartFlag(); |
| 73 | // Returns true if the ICE restart flag above was set, and no ICE restart has |
| 74 | // occurred yet for this transport (by applying a local description with |
| 75 | // changed ufrag/password). If the transport has been deleted as a result of |
| 76 | // bundling, returns false. |
| 77 | bool NeedsIceRestart(const std::string& transport_name) const; |
| 78 | |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 79 | bool GetSslRole(const std::string& transport_name, rtc::SSLRole* role) const; |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 80 | |
| 81 | // Specifies the identity to use in this session. |
| 82 | // Can only be called once. |
| 83 | bool SetLocalCertificate( |
| 84 | const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
| 85 | bool GetLocalCertificate( |
| 86 | const std::string& transport_name, |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 87 | rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const; |
| 88 | // Caller owns returned certificate. This method mainly exists for stats |
| 89 | // reporting. |
jbauch | 555604a | 2016-04-26 03:13:22 -0700 | [diff] [blame] | 90 | std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate( |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 91 | const std::string& transport_name) const; |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 92 | bool SetLocalTransportDescription(const std::string& transport_name, |
| 93 | const TransportDescription& tdesc, |
| 94 | ContentAction action, |
| 95 | std::string* err); |
| 96 | bool SetRemoteTransportDescription(const std::string& transport_name, |
| 97 | const TransportDescription& tdesc, |
| 98 | ContentAction action, |
| 99 | std::string* err); |
| 100 | // Start gathering candidates for any new transports, or transports doing an |
| 101 | // ICE restart. |
| 102 | void MaybeStartGathering(); |
| 103 | bool AddRemoteCandidates(const std::string& transport_name, |
| 104 | const Candidates& candidates, |
| 105 | std::string* err); |
Honghai Zhang | 7fb69db | 2016-03-14 11:59:18 -0700 | [diff] [blame] | 106 | bool RemoveRemoteCandidates(const Candidates& candidates, std::string* err); |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 107 | bool ReadyForRemoteCandidates(const std::string& transport_name) const; |
| 108 | // TODO(deadbeef): GetStats isn't const because all the way down to |
| 109 | // OpenSSLStreamAdapter, |
| 110 | // GetSslCipherSuite and GetDtlsSrtpCryptoSuite are not const. Fix this. |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 111 | bool GetStats(const std::string& transport_name, TransportStats* stats); |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 112 | void SetMetricsObserver(webrtc::MetricsObserverInterface* metrics_observer); |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 113 | |
Taylor Brandstetter | c4d3a5d | 2015-09-30 10:32:59 -0700 | [diff] [blame] | 114 | // Creates a channel if it doesn't exist. Otherwise, increments a reference |
| 115 | // count and returns an existing channel. |
zhihuang | b2cdd93 | 2017-01-19 16:54:25 -0800 | [diff] [blame] | 116 | DtlsTransportInternal* CreateDtlsTransport(const std::string& transport_name, |
| 117 | int component); |
| 118 | virtual DtlsTransportInternal* CreateDtlsTransport_n( |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 119 | const std::string& transport_name, |
| 120 | int component); |
Taylor Brandstetter | c4d3a5d | 2015-09-30 10:32:59 -0700 | [diff] [blame] | 121 | |
| 122 | // Decrements a channel's reference count, and destroys the channel if |
| 123 | // nothing is referencing it. |
zhihuang | b2cdd93 | 2017-01-19 16:54:25 -0800 | [diff] [blame] | 124 | virtual void DestroyDtlsTransport(const std::string& transport_name, |
| 125 | int component); |
| 126 | virtual void DestroyDtlsTransport_n(const std::string& transport_name, |
| 127 | int component); |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 128 | |
mikescarlett | e774867 | 2016-04-29 20:20:54 -0700 | [diff] [blame] | 129 | void use_quic() { quic_ = true; } |
| 130 | bool quic() const { return quic_; } |
| 131 | |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 132 | // TODO(deadbeef): Remove all for_testing methods! |
| 133 | const rtc::scoped_refptr<rtc::RTCCertificate>& certificate_for_testing() |
| 134 | const { |
| 135 | return certificate_; |
| 136 | } |
| 137 | std::vector<std::string> transport_names_for_testing(); |
zhihuang | b2cdd93 | 2017-01-19 16:54:25 -0800 | [diff] [blame] | 138 | std::vector<DtlsTransportInternal*> channels_for_testing(); |
| 139 | DtlsTransportInternal* get_channel_for_testing( |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 140 | const std::string& transport_name, |
| 141 | int component); |
| 142 | |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 143 | // All of these signals are fired on the signalling thread. |
| 144 | |
| 145 | // If any transport failed => failed, |
| 146 | // Else if all completed => completed, |
| 147 | // Else if all connected => connected, |
| 148 | // Else => connecting |
| 149 | sigslot::signal1<IceConnectionState> SignalConnectionState; |
| 150 | |
| 151 | // Receiving if any transport is receiving |
| 152 | sigslot::signal1<bool> SignalReceiving; |
| 153 | |
| 154 | // If all transports done gathering => complete, |
| 155 | // Else if any are gathering => gathering, |
| 156 | // Else => new |
| 157 | sigslot::signal1<IceGatheringState> SignalGatheringState; |
| 158 | |
| 159 | // (transport_name, candidates) |
| 160 | sigslot::signal2<const std::string&, const Candidates&> |
| 161 | SignalCandidatesGathered; |
| 162 | |
Honghai Zhang | 7fb69db | 2016-03-14 11:59:18 -0700 | [diff] [blame] | 163 | sigslot::signal1<const Candidates&> SignalCandidatesRemoved; |
| 164 | |
zhihuang | d82eee0 | 2016-08-26 11:25:05 -0700 | [diff] [blame] | 165 | sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError; |
| 166 | |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 167 | protected: |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 168 | // TODO(deadbeef): Get rid of these virtual methods. Used by |
| 169 | // FakeTransportController currently, but FakeTransportController shouldn't |
| 170 | // even be functioning by subclassing TransportController. |
zhihuang | d06adf6 | 2017-01-12 15:58:31 -0800 | [diff] [blame] | 171 | virtual IceTransportInternal* CreateIceTransportChannel_n( |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 172 | const std::string& transport_name, |
| 173 | int component); |
zhihuang | b2cdd93 | 2017-01-19 16:54:25 -0800 | [diff] [blame] | 174 | virtual DtlsTransportInternal* CreateDtlsTransportChannel_n( |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 175 | const std::string& transport_name, |
| 176 | int component, |
zhihuang | d06adf6 | 2017-01-12 15:58:31 -0800 | [diff] [blame] | 177 | IceTransportInternal* ice); |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 178 | |
| 179 | private: |
| 180 | void OnMessage(rtc::Message* pmsg) override; |
| 181 | |
deadbeef | 62802a1 | 2016-12-13 16:38:36 -0800 | [diff] [blame] | 182 | class ChannelPair; |
| 183 | typedef rtc::RefCountedObject<ChannelPair> RefCountedChannel; |
Taylor Brandstetter | c4d3a5d | 2015-09-30 10:32:59 -0700 | [diff] [blame] | 184 | |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 185 | // Helper functions to get a channel or transport, or iterator to it (in case |
| 186 | // it needs to be erased). |
deadbeef | 62802a1 | 2016-12-13 16:38:36 -0800 | [diff] [blame] | 187 | std::vector<RefCountedChannel*>::iterator GetChannelIterator_n( |
Taylor Brandstetter | c4d3a5d | 2015-09-30 10:32:59 -0700 | [diff] [blame] | 188 | const std::string& transport_name, |
| 189 | int component); |
deadbeef | 62802a1 | 2016-12-13 16:38:36 -0800 | [diff] [blame] | 190 | std::vector<RefCountedChannel*>::const_iterator GetChannelIterator_n( |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 191 | const std::string& transport_name, |
| 192 | int component) const; |
deadbeef | d1a38b5 | 2016-12-10 13:15:33 -0800 | [diff] [blame] | 193 | const JsepTransport* GetJsepTransport( |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 194 | const std::string& transport_name) const; |
deadbeef | d1a38b5 | 2016-12-10 13:15:33 -0800 | [diff] [blame] | 195 | JsepTransport* GetJsepTransport(const std::string& transport_name); |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 196 | const RefCountedChannel* GetChannel_n(const std::string& transport_name, |
| 197 | int component) const; |
| 198 | RefCountedChannel* GetChannel_n(const std::string& transport_name, |
| 199 | int component); |
Taylor Brandstetter | c4d3a5d | 2015-09-30 10:32:59 -0700 | [diff] [blame] | 200 | |
deadbeef | d1a38b5 | 2016-12-10 13:15:33 -0800 | [diff] [blame] | 201 | JsepTransport* GetOrCreateJsepTransport(const std::string& transport_name); |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 202 | void DestroyAllChannels_n(); |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 203 | |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 204 | bool SetSslMaxProtocolVersion_n(rtc::SSLProtocolVersion version); |
| 205 | void SetIceConfig_n(const IceConfig& config); |
| 206 | void SetIceRole_n(IceRole ice_role); |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 207 | bool GetSslRole_n(const std::string& transport_name, |
| 208 | rtc::SSLRole* role) const; |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 209 | bool SetLocalCertificate_n( |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 210 | const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 211 | bool GetLocalCertificate_n( |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 212 | const std::string& transport_name, |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 213 | rtc::scoped_refptr<rtc::RTCCertificate>* certificate) const; |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 214 | std::unique_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate_n( |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 215 | const std::string& transport_name) const; |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 216 | bool SetLocalTransportDescription_n(const std::string& transport_name, |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 217 | const TransportDescription& tdesc, |
| 218 | ContentAction action, |
| 219 | std::string* err); |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 220 | bool SetRemoteTransportDescription_n(const std::string& transport_name, |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 221 | const TransportDescription& tdesc, |
| 222 | ContentAction action, |
| 223 | std::string* err); |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 224 | void MaybeStartGathering_n(); |
| 225 | bool AddRemoteCandidates_n(const std::string& transport_name, |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 226 | const Candidates& candidates, |
| 227 | std::string* err); |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 228 | bool RemoveRemoteCandidates_n(const Candidates& candidates, std::string* err); |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 229 | bool ReadyForRemoteCandidates_n(const std::string& transport_name) const; |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 230 | bool GetStats_n(const std::string& transport_name, TransportStats* stats); |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 231 | void SetMetricsObserver_n(webrtc::MetricsObserverInterface* metrics_observer); |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 232 | |
| 233 | // Handlers for signals from Transport. |
deadbeef | 5bd5ca3 | 2017-02-10 11:31:50 -0800 | [diff] [blame^] | 234 | void OnChannelWritableState_n(rtc::PacketTransportInternal* transport); |
| 235 | void OnChannelReceivingState_n(rtc::PacketTransportInternal* transport); |
zhihuang | b2cdd93 | 2017-01-19 16:54:25 -0800 | [diff] [blame] | 236 | void OnChannelGatheringState_n(IceTransportInternal* channel); |
| 237 | void OnChannelCandidateGathered_n(IceTransportInternal* channel, |
Taylor Brandstetter | c4d3a5d | 2015-09-30 10:32:59 -0700 | [diff] [blame] | 238 | const Candidate& candidate); |
Honghai Zhang | 7fb69db | 2016-03-14 11:59:18 -0700 | [diff] [blame] | 239 | void OnChannelCandidatesRemoved(const Candidates& candidates); |
zhihuang | b2cdd93 | 2017-01-19 16:54:25 -0800 | [diff] [blame] | 240 | void OnChannelCandidatesRemoved_n(IceTransportInternal* channel, |
Honghai Zhang | 7fb69db | 2016-03-14 11:59:18 -0700 | [diff] [blame] | 241 | const Candidates& candidates); |
zhihuang | b2cdd93 | 2017-01-19 16:54:25 -0800 | [diff] [blame] | 242 | void OnChannelRoleConflict_n(IceTransportInternal* channel); |
| 243 | void OnChannelStateChanged_n(IceTransportInternal* channel); |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 244 | |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 245 | void UpdateAggregateStates_n(); |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 246 | |
zhihuang | d82eee0 | 2016-08-26 11:25:05 -0700 | [diff] [blame] | 247 | void OnDtlsHandshakeError(rtc::SSLHandshakeError error); |
| 248 | |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 249 | rtc::Thread* const signaling_thread_ = nullptr; |
Danil Chapovalov | 7f216b7 | 2016-05-12 09:20:31 +0200 | [diff] [blame] | 250 | rtc::Thread* const network_thread_ = nullptr; |
deadbeef | 57fd726 | 2016-12-06 15:28:55 -0800 | [diff] [blame] | 251 | PortAllocator* const port_allocator_ = nullptr; |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 252 | |
| 253 | std::map<std::string, std::unique_ptr<JsepTransport>> transports_; |
deadbeef | 62802a1 | 2016-12-13 16:38:36 -0800 | [diff] [blame] | 254 | std::vector<RefCountedChannel*> channels_; |
deadbeef | 57fd726 | 2016-12-06 15:28:55 -0800 | [diff] [blame] | 255 | |
Taylor Brandstetter | c4d3a5d | 2015-09-30 10:32:59 -0700 | [diff] [blame] | 256 | // Aggregate state for TransportChannelImpls. |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 257 | IceConnectionState connection_state_ = kIceConnectionConnecting; |
| 258 | bool receiving_ = false; |
| 259 | IceGatheringState gathering_state_ = kIceGatheringNew; |
| 260 | |
honghaiz | 1f429e3 | 2015-09-28 07:57:34 -0700 | [diff] [blame] | 261 | IceConfig ice_config_; |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 262 | IceRole ice_role_ = ICEROLE_CONTROLLING; |
Taylor Brandstetter | f0bb360 | 2016-08-26 20:59:24 -0700 | [diff] [blame] | 263 | bool redetermine_role_on_ice_restart_; |
Peter Boström | 0c4e06b | 2015-10-07 12:23:21 +0200 | [diff] [blame] | 264 | uint64_t ice_tiebreaker_ = rtc::CreateRandomId64(); |
deadbeef | 49f34fd | 2016-12-06 16:22:06 -0800 | [diff] [blame] | 265 | rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12; |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 266 | rtc::scoped_refptr<rtc::RTCCertificate> certificate_; |
Honghai Zhang | 7fb69db | 2016-03-14 11:59:18 -0700 | [diff] [blame] | 267 | rtc::AsyncInvoker invoker_; |
mikescarlett | e774867 | 2016-04-29 20:20:54 -0700 | [diff] [blame] | 268 | // True if QUIC is used instead of DTLS. |
| 269 | bool quic_ = false; |
Honghai Zhang | d93f50c | 2016-10-05 11:47:22 -0700 | [diff] [blame] | 270 | |
| 271 | webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; |
deadbeef | 62802a1 | 2016-12-13 16:38:36 -0800 | [diff] [blame] | 272 | |
| 273 | RTC_DISALLOW_COPY_AND_ASSIGN(TransportController); |
deadbeef | cbecd35 | 2015-09-23 11:50:27 -0700 | [diff] [blame] | 274 | }; |
| 275 | |
| 276 | } // namespace cricket |
| 277 | |
| 278 | #endif // WEBRTC_P2P_BASE_TRANSPORTCONTROLLER_H_ |