Chromium Code Reviews| 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 524 // side stops using it as well. | 524 // side stops using it as well. |
| 525 bool pruned() const { return pruned_; } | 525 bool pruned() const { return pruned_; } |
| 526 void Prune(); | 526 void Prune(); |
| 527 | 527 |
| 528 bool use_candidate_attr() const { return use_candidate_attr_; } | 528 bool use_candidate_attr() const { return use_candidate_attr_; } |
| 529 void set_use_candidate_attr(bool enable); | 529 void set_use_candidate_attr(bool enable); |
| 530 | 530 |
| 531 void set_nomination(uint32_t value) { nomination_ = value; } | 531 void set_nomination(uint32_t value) { nomination_ = value; } |
| 532 | 532 |
| 533 uint32_t remote_nomination() const { return remote_nomination_; } | 533 uint32_t remote_nomination() const { return remote_nomination_; } |
| 534 bool nominated() const { return remote_nomination_ > 0; } | 534 // One or several pairs may be nominated based on if Regular or Aggressive |
| 535 // Nomination is used. https://tools.ietf.org/html/rfc5245#section-8 | |
| 536 // |nominated| is defined both for the controlling or controlled agent based | |
| 537 // on if a nomination has been pinged or acknowledged. The controlled agent | |
| 538 // gets its |remote_nomination_| set when pinged by the controlling agent with | |
| 539 // a nomination value. The controlling agent gets its |acked_nomination_| set | |
| 540 // when receiving an acknowledgment ping in response to this. | |
|
Taylor Brandstetter
2017/02/24 11:45:31
I'd say "when receiving a response to a nominating
hbos
2017/02/24 15:16:46
Done.
| |
| 541 bool nominated() const { return acked_nomination_ || remote_nomination_; } | |
| 535 // Public for unit tests. | 542 // Public for unit tests. |
| 536 void set_remote_nomination(uint32_t remote_nomination) { | 543 void set_remote_nomination(uint32_t remote_nomination) { |
| 537 remote_nomination_ = remote_nomination; | 544 remote_nomination_ = remote_nomination; |
| 538 } | 545 } |
| 539 // Public for unit tests. | 546 // Public for unit tests. |
| 540 uint32_t acked_nomination() const { return acked_nomination_; } | 547 uint32_t acked_nomination() const { return acked_nomination_; } |
| 541 | 548 |
| 542 void set_remote_ice_mode(IceMode mode) { | 549 void set_remote_ice_mode(IceMode mode) { |
| 543 remote_ice_mode_ = mode; | 550 remote_ice_mode_ = mode; |
| 544 } | 551 } |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 728 const rtc::PacketOptions& options) override; | 735 const rtc::PacketOptions& options) override; |
| 729 int GetError() override { return error_; } | 736 int GetError() override { return error_; } |
| 730 | 737 |
| 731 private: | 738 private: |
| 732 int error_ = 0; | 739 int error_ = 0; |
| 733 }; | 740 }; |
| 734 | 741 |
| 735 } // namespace cricket | 742 } // namespace cricket |
| 736 | 743 |
| 737 #endif // WEBRTC_P2P_BASE_PORT_H_ | 744 #endif // WEBRTC_P2P_BASE_PORT_H_ |
| OLD | NEW |