Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: webrtc/p2p/base/dtlstransportchannel.h

Issue 1648813004: Remove candidates when doing continual gathering (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 void MaybeStartGathering() override { channel_->MaybeStartGathering(); } 184 void MaybeStartGathering() override { channel_->MaybeStartGathering(); }
185 185
186 IceGatheringState gathering_state() const override { 186 IceGatheringState gathering_state() const override {
187 return channel_->gathering_state(); 187 return channel_->gathering_state();
188 } 188 }
189 189
190 void AddRemoteCandidate(const Candidate& candidate) override { 190 void AddRemoteCandidate(const Candidate& candidate) override {
191 channel_->AddRemoteCandidate(candidate); 191 channel_->AddRemoteCandidate(candidate);
192 } 192 }
193 void RemoveRemoteCandidate(const Candidate& candidate) override {
194 channel_->RemoveRemoteCandidate(candidate);
195 }
193 196
194 void SetIceConfig(const IceConfig& config) override { 197 void SetIceConfig(const IceConfig& config) override {
195 channel_->SetIceConfig(config); 198 channel_->SetIceConfig(config);
196 } 199 }
197 200
198 // Needed by DtlsTransport. 201 // Needed by DtlsTransport.
199 TransportChannelImpl* channel() { return channel_; } 202 TransportChannelImpl* channel() { return channel_; }
200 203
201 private: 204 private:
202 void OnReadableState(TransportChannel* channel); 205 void OnReadableState(TransportChannel* channel);
203 void OnWritableState(TransportChannel* channel); 206 void OnWritableState(TransportChannel* channel);
204 void OnReadPacket(TransportChannel* channel, const char* data, size_t size, 207 void OnReadPacket(TransportChannel* channel, const char* data, size_t size,
205 const rtc::PacketTime& packet_time, int flags); 208 const rtc::PacketTime& packet_time, int flags);
206 void OnSentPacket(TransportChannel* channel, 209 void OnSentPacket(TransportChannel* channel,
207 const rtc::SentPacket& sent_packet); 210 const rtc::SentPacket& sent_packet);
208 void OnReadyToSend(TransportChannel* channel); 211 void OnReadyToSend(TransportChannel* channel);
209 void OnReceivingState(TransportChannel* channel); 212 void OnReceivingState(TransportChannel* channel);
210 void OnDtlsEvent(rtc::StreamInterface* stream_, int sig, int err); 213 void OnDtlsEvent(rtc::StreamInterface* stream_, int sig, int err);
211 bool SetupDtls(); 214 bool SetupDtls();
212 bool MaybeStartDtls(); 215 bool MaybeStartDtls();
213 bool HandleDtlsPacket(const char* data, size_t size); 216 bool HandleDtlsPacket(const char* data, size_t size);
214 void OnGatheringState(TransportChannelImpl* channel); 217 void OnGatheringState(TransportChannelImpl* channel);
215 void OnCandidateGathered(TransportChannelImpl* channel, const Candidate& c); 218 void OnCandidateGathered(TransportChannelImpl* channel, const Candidate& c);
219 void OnCandidatesRemoved(TransportChannelImpl* channel, const Candidates& cc);
Taylor Brandstetter 2016/02/10 21:58:08 Just curious, why name the variable cc?
pthatcher1 2016/02/11 20:25:51 Agreed
honghaiz3 2016/02/12 00:56:55 Changed to candidates. What I meant was one c mea
216 void OnRoleConflict(TransportChannelImpl* channel); 220 void OnRoleConflict(TransportChannelImpl* channel);
217 void OnRouteChange(TransportChannel* channel, const Candidate& candidate); 221 void OnRouteChange(TransportChannel* channel, const Candidate& candidate);
218 void OnConnectionRemoved(TransportChannelImpl* channel); 222 void OnConnectionRemoved(TransportChannelImpl* channel);
219 void Reconnect(); 223 void Reconnect();
220 224
221 Transport* transport_; // The transport_ that created us. 225 Transport* transport_; // The transport_ that created us.
222 rtc::Thread* worker_thread_; // Everything should occur on this thread. 226 rtc::Thread* worker_thread_; // Everything should occur on this thread.
223 // Underlying channel, owned by transport_. 227 // Underlying channel, owned by transport_.
224 TransportChannelImpl* const channel_; 228 TransportChannelImpl* const channel_;
225 rtc::scoped_ptr<rtc::SSLStreamAdapter> dtls_; // The DTLS stream 229 rtc::scoped_ptr<rtc::SSLStreamAdapter> dtls_; // The DTLS stream
226 StreamInterfaceChannel* downward_; // Wrapper for channel_, owned by dtls_. 230 StreamInterfaceChannel* downward_; // Wrapper for channel_, owned by dtls_.
227 std::vector<int> srtp_ciphers_; // SRTP ciphers to use with DTLS. 231 std::vector<int> srtp_ciphers_; // SRTP ciphers to use with DTLS.
228 bool dtls_active_ = false; 232 bool dtls_active_ = false;
229 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; 233 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_;
230 rtc::SSLRole ssl_role_; 234 rtc::SSLRole ssl_role_;
231 rtc::SSLProtocolVersion ssl_max_version_; 235 rtc::SSLProtocolVersion ssl_max_version_;
232 rtc::Buffer remote_fingerprint_value_; 236 rtc::Buffer remote_fingerprint_value_;
233 std::string remote_fingerprint_algorithm_; 237 std::string remote_fingerprint_algorithm_;
234 238
235 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportChannelWrapper); 239 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportChannelWrapper);
236 }; 240 };
237 241
238 } // namespace cricket 242 } // namespace cricket
239 243
240 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ 244 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698