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

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

Issue 2224563004: Add signaling to support ICE renomination. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge Created 4 years, 3 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
« no previous file with comments | « webrtc/p2p/base/port.h ('k') | webrtc/p2p/base/transport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 stats_.sent_ping_requests_total++; 1416 stats_.sent_ping_requests_total++;
1417 if (stats_.recv_ping_responses == 0) { 1417 if (stats_.recv_ping_responses == 0) {
1418 stats_.sent_ping_requests_before_first_response++; 1418 stats_.sent_ping_requests_before_first_response++;
1419 } 1419 }
1420 } 1420 }
1421 1421
1422 void Connection::HandleRoleConflictFromPeer() { 1422 void Connection::HandleRoleConflictFromPeer() {
1423 port_->SignalRoleConflict(port_); 1423 port_->SignalRoleConflict(port_);
1424 } 1424 }
1425 1425
1426 void Connection::MaybeSetRemoteIceCredentialsAndGeneration( 1426 void Connection::MaybeSetRemoteIceParametersAndGeneration(
1427 const std::string& ice_ufrag, 1427 const IceParameters& ice_params,
1428 const std::string& ice_pwd,
1429 int generation) { 1428 int generation) {
1430 if (remote_candidate_.username() == ice_ufrag && 1429 if (remote_candidate_.username() == ice_params.ufrag &&
1431 remote_candidate_.password().empty()) { 1430 remote_candidate_.password().empty()) {
1432 remote_candidate_.set_password(ice_pwd); 1431 remote_candidate_.set_password(ice_params.pwd);
1433 } 1432 }
1434 // TODO(deadbeef): A value of '0' for the generation is used for both 1433 // TODO(deadbeef): A value of '0' for the generation is used for both
1435 // generation 0 and "generation unknown". It should be changed to an 1434 // generation 0 and "generation unknown". It should be changed to an
1436 // rtc::Optional to fix this. 1435 // rtc::Optional to fix this.
1437 if (remote_candidate_.username() == ice_ufrag && 1436 if (remote_candidate_.username() == ice_params.ufrag &&
1438 remote_candidate_.password() == ice_pwd && 1437 remote_candidate_.password() == ice_params.pwd &&
1439 remote_candidate_.generation() == 0) { 1438 remote_candidate_.generation() == 0) {
1440 remote_candidate_.set_generation(generation); 1439 remote_candidate_.set_generation(generation);
1441 } 1440 }
1442 } 1441 }
1443 1442
1444 void Connection::MaybeUpdatePeerReflexiveCandidate( 1443 void Connection::MaybeUpdatePeerReflexiveCandidate(
1445 const Candidate& new_candidate) { 1444 const Candidate& new_candidate) {
1446 if (remote_candidate_.type() == PRFLX_PORT_TYPE && 1445 if (remote_candidate_.type() == PRFLX_PORT_TYPE &&
1447 new_candidate.type() != PRFLX_PORT_TYPE && 1446 new_candidate.type() != PRFLX_PORT_TYPE &&
1448 remote_candidate_.protocol() == new_candidate.protocol() && 1447 remote_candidate_.protocol() == new_candidate.protocol() &&
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 ASSERT(sent < 0); 1572 ASSERT(sent < 0);
1574 error_ = port_->GetError(); 1573 error_ = port_->GetError();
1575 stats_.sent_discarded_packets++; 1574 stats_.sent_discarded_packets++;
1576 } else { 1575 } else {
1577 send_rate_tracker_.AddSamples(sent); 1576 send_rate_tracker_.AddSamples(sent);
1578 } 1577 }
1579 return sent; 1578 return sent;
1580 } 1579 }
1581 1580
1582 } // namespace cricket 1581 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port.h ('k') | webrtc/p2p/base/transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698