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

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

Issue 1277263002: Add instrumentation to track the IceEndpointType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 4 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 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 // If candidate filter only allows relay type of address, empty raddr to 668 // If candidate filter only allows relay type of address, empty raddr to
669 // avoid local address leakage. 669 // avoid local address leakage.
670 related_address = rtc::EmptySocketAddressWithFamily(stun_address.family()); 670 related_address = rtc::EmptySocketAddressWithFamily(stun_address.family());
671 } 671 }
672 672
673 // For relayed candidate, Base is the candidate itself. 673 // For relayed candidate, Base is the candidate itself.
674 AddAddress(address, // Candidate address. 674 AddAddress(address, // Candidate address.
675 address, // Base address. 675 address, // Base address.
676 related_address, // Related address. 676 related_address, // Related address.
677 UDP_PROTOCOL_NAME, 677 UDP_PROTOCOL_NAME,
678 ProtoToString(server_address_.proto), // The first hop protocol.
678 "", // TCP canddiate type, empty for turn candidates. 679 "", // TCP canddiate type, empty for turn candidates.
679 RELAY_PORT_TYPE, 680 RELAY_PORT_TYPE,
680 GetRelayPreference(server_address_.proto, server_address_.secure), 681 GetRelayPreference(server_address_.proto, server_address_.secure),
681 server_priority_, 682 server_priority_, true);
682 true);
683 } 683 }
684 684
685 void TurnPort::OnAllocateError() { 685 void TurnPort::OnAllocateError() {
686 // We will send SignalPortError asynchronously as this can be sent during 686 // We will send SignalPortError asynchronously as this can be sent during
687 // port initialization. This way it will not be blocking other port 687 // port initialization. This way it will not be blocking other port
688 // creation. 688 // creation.
689 thread()->Post(this, MSG_ERROR); 689 thread()->Post(this, MSG_ERROR);
690 } 690 }
691 691
692 void TurnPort::OnMessage(rtc::Message* message) { 692 void TurnPort::OnMessage(rtc::Message* message) {
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 // bind request as per http://tools.ietf.org/html/rfc5766#section-11.3 1362 // bind request as per http://tools.ietf.org/html/rfc5766#section-11.3
1363 if (code == STUN_ERROR_STALE_NONCE) { 1363 if (code == STUN_ERROR_STALE_NONCE) {
1364 if (port_->UpdateNonce(response)) { 1364 if (port_->UpdateNonce(response)) {
1365 // Send channel bind request with fresh nonce. 1365 // Send channel bind request with fresh nonce.
1366 SendChannelBindRequest(0); 1366 SendChannelBindRequest(0);
1367 } 1367 }
1368 } 1368 }
1369 } 1369 }
1370 1370
1371 } // namespace cricket 1371 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698