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 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1437 session_->allocator()->origin()); | 1437 session_->allocator()->origin()); |
1438 turn_ports_.push_back(port); | 1438 turn_ports_.push_back(port); |
1439 // Listen to the port destroyed signal, to allow AllocationSequence to | 1439 // Listen to the port destroyed signal, to allow AllocationSequence to |
1440 // remove entrt from it's map. | 1440 // remove entrt from it's map. |
1441 port->SignalDestroyed.connect(this, &AllocationSequence::OnPortDestroyed); | 1441 port->SignalDestroyed.connect(this, &AllocationSequence::OnPortDestroyed); |
1442 } else { | 1442 } else { |
1443 port = TurnPort::Create( | 1443 port = TurnPort::Create( |
1444 session_->network_thread(), session_->socket_factory(), network_, | 1444 session_->network_thread(), session_->socket_factory(), network_, |
1445 session_->allocator()->min_port(), session_->allocator()->max_port(), | 1445 session_->allocator()->min_port(), session_->allocator()->max_port(), |
1446 session_->username(), session_->password(), *relay_port, | 1446 session_->username(), session_->password(), *relay_port, |
1447 config.credentials, config.priority, session_->allocator()->origin()); | 1447 config.credentials, config.priority, session_->allocator()->origin(), |
| 1448 config.tls_alpn_protocols); |
1448 } | 1449 } |
1449 RTC_DCHECK(port != NULL); | 1450 RTC_DCHECK(port != NULL); |
1450 port->SetTlsCertPolicy(config.tls_cert_policy); | 1451 port->SetTlsCertPolicy(config.tls_cert_policy); |
1451 session_->AddAllocatedPort(port, this, true); | 1452 session_->AddAllocatedPort(port, this, true); |
1452 } | 1453 } |
1453 } | 1454 } |
1454 | 1455 |
1455 void AllocationSequence::OnReadPacket( | 1456 void AllocationSequence::OnReadPacket( |
1456 rtc::AsyncPacketSocket* socket, const char* data, size_t size, | 1457 rtc::AsyncPacketSocket* socket, const char* data, size_t size, |
1457 const rtc::SocketAddress& remote_addr, | 1458 const rtc::SocketAddress& remote_addr, |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 ServerAddresses servers; | 1572 ServerAddresses servers; |
1572 for (size_t i = 0; i < relays.size(); ++i) { | 1573 for (size_t i = 0; i < relays.size(); ++i) { |
1573 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { | 1574 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { |
1574 servers.insert(relays[i].ports.front().address); | 1575 servers.insert(relays[i].ports.front().address); |
1575 } | 1576 } |
1576 } | 1577 } |
1577 return servers; | 1578 return servers; |
1578 } | 1579 } |
1579 | 1580 |
1580 } // namespace cricket | 1581 } // namespace cricket |
OLD | NEW |