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

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

Issue 2099023002: Fix the turn and udp port type. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with head Created 4 years, 5 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/stunport.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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 static std::string ComputeFoundation(const std::string& type, 123 static std::string ComputeFoundation(const std::string& type,
124 const std::string& protocol, 124 const std::string& protocol,
125 const std::string& relay_protocol, 125 const std::string& relay_protocol,
126 const rtc::SocketAddress& base_address) { 126 const rtc::SocketAddress& base_address) {
127 std::ostringstream ost; 127 std::ostringstream ost;
128 ost << type << base_address.ipaddr().ToString() << protocol << relay_protocol; 128 ost << type << base_address.ipaddr().ToString() << protocol << relay_protocol;
129 return rtc::ToString<uint32_t>(rtc::ComputeCrc32(ost.str())); 129 return rtc::ToString<uint32_t>(rtc::ComputeCrc32(ost.str()));
130 } 130 }
131 131
132 Port::Port(rtc::Thread* thread, 132 Port::Port(rtc::Thread* thread,
133 const std::string& type,
133 rtc::PacketSocketFactory* factory, 134 rtc::PacketSocketFactory* factory,
134 rtc::Network* network, 135 rtc::Network* network,
135 const rtc::IPAddress& ip, 136 const rtc::IPAddress& ip,
136 const std::string& username_fragment, 137 const std::string& username_fragment,
137 const std::string& password) 138 const std::string& password)
138 : thread_(thread), 139 : thread_(thread),
139 factory_(factory), 140 factory_(factory),
141 type_(type),
140 send_retransmit_count_attribute_(false), 142 send_retransmit_count_attribute_(false),
141 network_(network), 143 network_(network),
142 ip_(ip), 144 ip_(ip),
143 min_port_(0), 145 min_port_(0),
144 max_port_(0), 146 max_port_(0),
145 component_(ICE_CANDIDATE_COMPONENT_DEFAULT), 147 component_(ICE_CANDIDATE_COMPONENT_DEFAULT),
146 generation_(0), 148 generation_(0),
147 ice_username_fragment_(username_fragment), 149 ice_username_fragment_(username_fragment),
148 password_(password), 150 password_(password),
149 timeout_delay_(kPortTimeoutDelay), 151 timeout_delay_(kPortTimeoutDelay),
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 ASSERT(sent < 0); 1538 ASSERT(sent < 0);
1537 error_ = port_->GetError(); 1539 error_ = port_->GetError();
1538 stats_.sent_discarded_packets++; 1540 stats_.sent_discarded_packets++;
1539 } else { 1541 } else {
1540 send_rate_tracker_.AddSamples(sent); 1542 send_rate_tracker_.AddSamples(sent);
1541 } 1543 }
1542 return sent; 1544 return sent;
1543 } 1545 }
1544 1546
1545 } // namespace cricket 1547 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port.h ('k') | webrtc/p2p/base/stunport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698