OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |