| 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 // (5). Can set to INT_MAX to effectively disable the limit. | 441 // (5). Can set to INT_MAX to effectively disable the limit. |
| 442 // | 442 // |
| 443 // TODO(deadbeef): Applications shouldn't have to arbitrarily limit the | 443 // TODO(deadbeef): Applications shouldn't have to arbitrarily limit the |
| 444 // number of available IPv6 network interfaces just because they could slow | 444 // number of available IPv6 network interfaces just because they could slow |
| 445 // ICE down. We should work on making our ICE logic smarter (for example, | 445 // ICE down. We should work on making our ICE logic smarter (for example, |
| 446 // prioritizing pinging connections that are most likely to work) so that | 446 // prioritizing pinging connections that are most likely to work) so that |
| 447 // every network interface can be used without impacting ICE's speed. | 447 // every network interface can be used without impacting ICE's speed. |
| 448 void set_max_ipv6_networks(int networks) { max_ipv6_networks_ = networks; } | 448 void set_max_ipv6_networks(int networks) { max_ipv6_networks_ = networks; } |
| 449 int max_ipv6_networks() { return max_ipv6_networks_; } | 449 int max_ipv6_networks() { return max_ipv6_networks_; } |
| 450 | 450 |
| 451 // Delay between different candidate gathering phases (UDP, TURN, TCP). |
| 452 // Defaults to 1 second, but PeerConnection sets it to 50ms. |
| 453 // TODO(deadbeef): Get rid of this. Its purpose is to avoid sending too many |
| 454 // STUN transactions at once, but that's already happening if you configure |
| 455 // multiple STUN servers or have multiple network interfaces. We should |
| 456 // implement some global pacing logic instead if that's our goal. |
| 451 uint32_t step_delay() const { return step_delay_; } | 457 uint32_t step_delay() const { return step_delay_; } |
| 452 void set_step_delay(uint32_t delay) { step_delay_ = delay; } | 458 void set_step_delay(uint32_t delay) { step_delay_ = delay; } |
| 453 | 459 |
| 454 bool allow_tcp_listen() const { return allow_tcp_listen_; } | 460 bool allow_tcp_listen() const { return allow_tcp_listen_; } |
| 455 void set_allow_tcp_listen(bool allow_tcp_listen) { | 461 void set_allow_tcp_listen(bool allow_tcp_listen) { |
| 456 allow_tcp_listen_ = allow_tcp_listen; | 462 allow_tcp_listen_ = allow_tcp_listen; |
| 457 } | 463 } |
| 458 | 464 |
| 459 uint32_t candidate_filter() { return candidate_filter_; } | 465 uint32_t candidate_filter() { return candidate_filter_; } |
| 460 void set_candidate_filter(uint32_t filter) { | 466 void set_candidate_filter(uint32_t filter) { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_; | 510 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_; |
| 505 bool candidate_pool_frozen_ = false; | 511 bool candidate_pool_frozen_ = false; |
| 506 bool prune_turn_ports_ = false; | 512 bool prune_turn_ports_ = false; |
| 507 | 513 |
| 508 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; | 514 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; |
| 509 }; | 515 }; |
| 510 | 516 |
| 511 } // namespace cricket | 517 } // namespace cricket |
| 512 | 518 |
| 513 #endif // P2P_BASE_PORTALLOCATOR_H_ | 519 #endif // P2P_BASE_PORTALLOCATOR_H_ |
| OLD | NEW |