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

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

Issue 2018693002: Create a new connection if a candidate reuses an address (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Sync with head Created 4 years, 6 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 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 // Checks if the address in addr is compatible with the port's ip. 340 // Checks if the address in addr is compatible with the port's ip.
341 bool IsCompatibleAddress(const rtc::SocketAddress& addr); 341 bool IsCompatibleAddress(const rtc::SocketAddress& addr);
342 342
343 // Returns default DSCP value. 343 // Returns default DSCP value.
344 rtc::DiffServCodePoint DefaultDscpValue() const { 344 rtc::DiffServCodePoint DefaultDscpValue() const {
345 // No change from what MediaChannel set. 345 // No change from what MediaChannel set.
346 return rtc::DSCP_NO_CHANGE; 346 return rtc::DSCP_NO_CHANGE;
347 } 347 }
348 348
349 // Extra work to be done in subclasses when a connection is destroyed.
350 virtual void HandleConnectionDestroyed(Connection* conn) {}
351
349 private: 352 private:
350 void Construct(); 353 void Construct();
351 // Called when one of our connections deletes itself. 354 // Called when one of our connections deletes itself.
352 void OnConnectionDestroyed(Connection* conn); 355 void OnConnectionDestroyed(Connection* conn);
353 356
354 // Whether this port is dead, and hence, should be destroyed on the controlled 357 // Whether this port is dead, and hence, should be destroyed on the controlled
355 // side. 358 // side.
356 bool dead() const { 359 bool dead() const {
357 return ice_role_ == ICEROLE_CONTROLLED && connections_.empty(); 360 return ice_role_ == ICEROLE_CONTROLLED && connections_.empty();
358 } 361 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 const rtc::PacketOptions& options) override; 669 const rtc::PacketOptions& options) override;
667 int GetError() override { return error_; } 670 int GetError() override { return error_; }
668 671
669 private: 672 private:
670 int error_ = 0; 673 int error_ = 0;
671 }; 674 };
672 675
673 } // namespace cricket 676 } // namespace cricket
674 677
675 #endif // WEBRTC_P2P_BASE_PORT_H_ 678 #endif // WEBRTC_P2P_BASE_PORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698