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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 } | 806 } |
807 | 807 |
808 Connection::~Connection() { | 808 Connection::~Connection() { |
809 } | 809 } |
810 | 810 |
811 const Candidate& Connection::local_candidate() const { | 811 const Candidate& Connection::local_candidate() const { |
812 ASSERT(local_candidate_index_ < port_->Candidates().size()); | 812 ASSERT(local_candidate_index_ < port_->Candidates().size()); |
813 return port_->Candidates()[local_candidate_index_]; | 813 return port_->Candidates()[local_candidate_index_]; |
814 } | 814 } |
815 | 815 |
| 816 const Candidate& Connection::remote_candidate() const { |
| 817 return remote_candidate_; |
| 818 } |
| 819 |
816 uint64_t Connection::priority() const { | 820 uint64_t Connection::priority() const { |
817 uint64_t priority = 0; | 821 uint64_t priority = 0; |
818 // RFC 5245 - 5.7.2. Computing Pair Priority and Ordering Pairs | 822 // RFC 5245 - 5.7.2. Computing Pair Priority and Ordering Pairs |
819 // Let G be the priority for the candidate provided by the controlling | 823 // Let G be the priority for the candidate provided by the controlling |
820 // agent. Let D be the priority for the candidate provided by the | 824 // agent. Let D be the priority for the candidate provided by the |
821 // controlled agent. | 825 // controlled agent. |
822 // pair priority = 2^32*MIN(G,D) + 2*MAX(G,D) + (G>D?1:0) | 826 // pair priority = 2^32*MIN(G,D) + 2*MAX(G,D) + (G>D?1:0) |
823 IceRole role = port_->GetIceRole(); | 827 IceRole role = port_->GetIceRole(); |
824 if (role != ICEROLE_UNKNOWN) { | 828 if (role != ICEROLE_UNKNOWN) { |
825 uint32_t g = 0; | 829 uint32_t g = 0; |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 ASSERT(sent < 0); | 1440 ASSERT(sent < 0); |
1437 error_ = port_->GetError(); | 1441 error_ = port_->GetError(); |
1438 sent_packets_discarded_++; | 1442 sent_packets_discarded_++; |
1439 } else { | 1443 } else { |
1440 send_rate_tracker_.AddSamples(sent); | 1444 send_rate_tracker_.AddSamples(sent); |
1441 } | 1445 } |
1442 return sent; | 1446 return sent; |
1443 } | 1447 } |
1444 | 1448 |
1445 } // namespace cricket | 1449 } // namespace cricket |
OLD | NEW |