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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 245 |
246 void Port::AddAddress(const rtc::SocketAddress& address, | 246 void Port::AddAddress(const rtc::SocketAddress& address, |
247 const rtc::SocketAddress& base_address, | 247 const rtc::SocketAddress& base_address, |
248 const rtc::SocketAddress& related_address, | 248 const rtc::SocketAddress& related_address, |
249 const std::string& protocol, | 249 const std::string& protocol, |
250 const std::string& relay_protocol, | 250 const std::string& relay_protocol, |
251 const std::string& tcptype, | 251 const std::string& tcptype, |
252 const std::string& type, | 252 const std::string& type, |
253 uint32_t type_preference, | 253 uint32_t type_preference, |
254 uint32_t relay_preference, | 254 uint32_t relay_preference, |
| 255 bool final) { |
| 256 AddAddress(address, base_address, related_address, protocol, relay_protocol, |
| 257 tcptype, type, type_preference, relay_preference, "", final); |
| 258 } |
| 259 |
| 260 void Port::AddAddress(const rtc::SocketAddress& address, |
| 261 const rtc::SocketAddress& base_address, |
| 262 const rtc::SocketAddress& related_address, |
| 263 const std::string& protocol, |
| 264 const std::string& relay_protocol, |
| 265 const std::string& tcptype, |
| 266 const std::string& type, |
| 267 uint32_t type_preference, |
| 268 uint32_t relay_preference, |
255 const std::string& url, | 269 const std::string& url, |
256 bool final) { | 270 bool final) { |
257 if (protocol == TCP_PROTOCOL_NAME && type == LOCAL_PORT_TYPE) { | 271 if (protocol == TCP_PROTOCOL_NAME && type == LOCAL_PORT_TYPE) { |
258 RTC_DCHECK(!tcptype.empty()); | 272 RTC_DCHECK(!tcptype.empty()); |
259 } | 273 } |
260 | 274 |
261 std::string foundation = | 275 std::string foundation = |
262 ComputeFoundation(type, protocol, relay_protocol, base_address); | 276 ComputeFoundation(type, protocol, relay_protocol, base_address); |
263 Candidate c(component_, protocol, address, 0U, username_fragment(), password_, | 277 Candidate c(component_, protocol, address, 0U, username_fragment(), password_, |
264 type, generation_, foundation, network_->id(), network_cost_); | 278 type, generation_, foundation, network_->id(), network_cost_); |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 RTC_DCHECK(sent < 0); | 1604 RTC_DCHECK(sent < 0); |
1591 error_ = port_->GetError(); | 1605 error_ = port_->GetError(); |
1592 stats_.sent_discarded_packets++; | 1606 stats_.sent_discarded_packets++; |
1593 } else { | 1607 } else { |
1594 send_rate_tracker_.AddSamples(sent); | 1608 send_rate_tracker_.AddSamples(sent); |
1595 } | 1609 } |
1596 return sent; | 1610 return sent; |
1597 } | 1611 } |
1598 | 1612 |
1599 } // namespace cricket | 1613 } // namespace cricket |
OLD | NEW |