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