| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 AddressMap::iterator iter = connections_.begin(); | 212 AddressMap::iterator iter = connections_.begin(); |
| 213 while (iter != connections_.end()) { | 213 while (iter != connections_.end()) { |
| 214 list.push_back(iter->second); | 214 list.push_back(iter->second); |
| 215 ++iter; | 215 ++iter; |
| 216 } | 216 } |
| 217 | 217 |
| 218 for (uint32_t i = 0; i < list.size(); i++) | 218 for (uint32_t i = 0; i < list.size(); i++) |
| 219 delete list[i]; | 219 delete list[i]; |
| 220 } | 220 } |
| 221 | 221 |
| 222 void Port::SetTransportInformation(int component, |
| 223 const std::string username_fragment, |
| 224 const std::string& password) { |
| 225 component_ = component; |
| 226 ice_username_fragment_ = username_fragment; |
| 227 password_ = password; |
| 228 for (Candidate& c : candidates_) { |
| 229 c.set_component(component); |
| 230 c.set_username(username_fragment); |
| 231 c.set_password(password); |
| 232 } |
| 233 } |
| 234 |
| 222 Connection* Port::GetConnection(const rtc::SocketAddress& remote_addr) { | 235 Connection* Port::GetConnection(const rtc::SocketAddress& remote_addr) { |
| 223 AddressMap::const_iterator iter = connections_.find(remote_addr); | 236 AddressMap::const_iterator iter = connections_.find(remote_addr); |
| 224 if (iter != connections_.end()) | 237 if (iter != connections_.end()) |
| 225 return iter->second; | 238 return iter->second; |
| 226 else | 239 else |
| 227 return NULL; | 240 return NULL; |
| 228 } | 241 } |
| 229 | 242 |
| 230 void Port::AddAddress(const rtc::SocketAddress& address, | 243 void Port::AddAddress(const rtc::SocketAddress& address, |
| 231 const rtc::SocketAddress& base_address, | 244 const rtc::SocketAddress& base_address, |
| (...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1449 ASSERT(sent < 0); | 1462 ASSERT(sent < 0); |
| 1450 error_ = port_->GetError(); | 1463 error_ = port_->GetError(); |
| 1451 sent_packets_discarded_++; | 1464 sent_packets_discarded_++; |
| 1452 } else { | 1465 } else { |
| 1453 send_rate_tracker_.AddSamples(sent); | 1466 send_rate_tracker_.AddSamples(sent); |
| 1454 } | 1467 } |
| 1455 return sent; | 1468 return sent; |
| 1456 } | 1469 } |
| 1457 | 1470 |
| 1458 } // namespace cricket | 1471 } // namespace cricket |
| OLD | NEW |