OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 private: | 168 private: |
169 AsyncCallback callback_; | 169 AsyncCallback callback_; |
170 }; | 170 }; |
171 | 171 |
172 bool ResolveServerName(const rtc::SocketAddress& addr); | 172 bool ResolveServerName(const rtc::SocketAddress& addr); |
173 void OnServerResolved(rtc::AsyncResolverInterface* resolver); | 173 void OnServerResolved(rtc::AsyncResolverInterface* resolver); |
174 | 174 |
175 void OnSocketReady(rtc::AsyncPacketSocket* socket, | 175 void OnSocketReady(rtc::AsyncPacketSocket* socket, |
176 const rtc::SocketAddress& addr); | 176 const rtc::SocketAddress& addr); |
177 | 177 |
| 178 void CreateSockets(); |
| 179 |
178 bool Done() { | 180 bool Done() { |
179 return num_request_sent_ >= requests_per_ip_ * all_servers_addrs_.size(); | 181 return num_request_sent_ >= requests_per_ip_ * all_servers_addrs_.size(); |
180 } | 182 } |
181 | 183 |
182 size_t total_socket_required() { | 184 size_t total_socket_required() { |
183 return (shared_socket_mode_ ? 1 : all_servers_addrs_.size()) * | 185 return (shared_socket_mode_ ? 1 : all_servers_addrs_.size()) * |
184 requests_per_ip_; | 186 requests_per_ip_; |
185 } | 187 } |
186 | 188 |
187 bool should_send_next_request(int64_t now); | 189 bool should_send_next_request(int64_t now); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 ObserverAdapter observer_adapter_; | 247 ObserverAdapter observer_adapter_; |
246 | 248 |
247 rtc::NetworkManager::NetworkList networks_; | 249 rtc::NetworkManager::NetworkList networks_; |
248 | 250 |
249 RTC_DISALLOW_COPY_AND_ASSIGN(StunProber); | 251 RTC_DISALLOW_COPY_AND_ASSIGN(StunProber); |
250 }; | 252 }; |
251 | 253 |
252 } // namespace stunprober | 254 } // namespace stunprober |
253 | 255 |
254 #endif // WEBRTC_P2P_STUNPROBER_STUNPROBER_H_ | 256 #endif // WEBRTC_P2P_STUNPROBER_STUNPROBER_H_ |
OLD | NEW |