| 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 flags_(flags), | 713 flags_(flags), |
| 714 udp_socket_(), | 714 udp_socket_(), |
| 715 udp_port_(NULL), | 715 udp_port_(NULL), |
| 716 phase_(0) { | 716 phase_(0) { |
| 717 } | 717 } |
| 718 | 718 |
| 719 bool AllocationSequence::Init() { | 719 bool AllocationSequence::Init() { |
| 720 if (IsFlagSet(PORTALLOCATOR_ENABLE_SHARED_SOCKET)) { | 720 if (IsFlagSet(PORTALLOCATOR_ENABLE_SHARED_SOCKET)) { |
| 721 udp_socket_.reset(session_->socket_factory()->CreateUdpSocket( | 721 udp_socket_.reset(session_->socket_factory()->CreateUdpSocket( |
| 722 rtc::SocketAddress(ip_, 0), session_->allocator()->min_port(), | 722 rtc::SocketAddress(ip_, 0), session_->allocator()->min_port(), |
| 723 session_->allocator()->max_port())); | 723 session_->allocator()->max_port(), network_)); |
| 724 if (udp_socket_) { | 724 if (udp_socket_) { |
| 725 udp_socket_->SignalReadPacket.connect( | 725 udp_socket_->SignalReadPacket.connect( |
| 726 this, &AllocationSequence::OnReadPacket); | 726 this, &AllocationSequence::OnReadPacket); |
| 727 } | 727 } |
| 728 // Continuing if |udp_socket_| is NULL, as local TCP and RelayPort using TCP | 728 // Continuing if |udp_socket_| is NULL, as local TCP and RelayPort using TCP |
| 729 // are next available options to setup a communication channel. | 729 // are next available options to setup a communication channel. |
| 730 } | 730 } |
| 731 return true; | 731 return true; |
| 732 } | 732 } |
| 733 | 733 |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 ServerAddresses servers; | 1177 ServerAddresses servers; |
| 1178 for (size_t i = 0; i < relays.size(); ++i) { | 1178 for (size_t i = 0; i < relays.size(); ++i) { |
| 1179 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { | 1179 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { |
| 1180 servers.insert(relays[i].ports.front().address); | 1180 servers.insert(relays[i].ports.front().address); |
| 1181 } | 1181 } |
| 1182 } | 1182 } |
| 1183 return servers; | 1183 return servers; |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 } // namespace cricket | 1186 } // namespace cricket |
| OLD | NEW |