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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 int candidate_pool_size() const { return target_pooled_session_count_; } | 294 int candidate_pool_size() const { return target_pooled_session_count_; } |
295 | 295 |
296 // Sets the network types to ignore. | 296 // Sets the network types to ignore. |
297 // Values are defined by the AdapterType enum. | 297 // Values are defined by the AdapterType enum. |
298 // For instance, calling this with | 298 // For instance, calling this with |
299 // ADAPTER_TYPE_ETHERNET | ADAPTER_TYPE_LOOPBACK will ignore Ethernet and | 299 // ADAPTER_TYPE_ETHERNET | ADAPTER_TYPE_LOOPBACK will ignore Ethernet and |
300 // loopback interfaces. | 300 // loopback interfaces. |
301 virtual void SetNetworkIgnoreMask(int network_ignore_mask) = 0; | 301 virtual void SetNetworkIgnoreMask(int network_ignore_mask) = 0; |
302 | 302 |
303 std::unique_ptr<PortAllocatorSession> CreateSession( | 303 std::unique_ptr<PortAllocatorSession> CreateSession( |
304 const std::string& sid, | |
305 const std::string& content_name, | 304 const std::string& content_name, |
306 int component, | 305 int component, |
307 const std::string& ice_ufrag, | 306 const std::string& ice_ufrag, |
308 const std::string& ice_pwd); | 307 const std::string& ice_pwd); |
309 | 308 |
310 // Get an available pooled session and set the transport information on it. | 309 // Get an available pooled session and set the transport information on it. |
311 // | 310 // |
312 // Caller takes ownership of the returned session. | 311 // Caller takes ownership of the returned session. |
313 // | 312 // |
314 // If no pooled sessions are available, returns null. | 313 // If no pooled sessions are available, returns null. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 // This variable represents the total number of pooled sessions | 387 // This variable represents the total number of pooled sessions |
389 // both owned by this class and taken by TakePooledSession. | 388 // both owned by this class and taken by TakePooledSession. |
390 int allocated_pooled_session_count_ = 0; | 389 int allocated_pooled_session_count_ = 0; |
391 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_; | 390 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_; |
392 bool prune_turn_ports_ = false; | 391 bool prune_turn_ports_ = false; |
393 }; | 392 }; |
394 | 393 |
395 } // namespace cricket | 394 } // namespace cricket |
396 | 395 |
397 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ | 396 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ |
OLD | NEW |