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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 // interface as seen by regular http traffic and the HOST candidate associated | 54 // interface as seen by regular http traffic and the HOST candidate associated |
55 // with the default local interface. | 55 // with the default local interface. |
56 PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION = 0x400, | 56 PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION = 0x400, |
57 // When specified along with PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION, the | 57 // When specified along with PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION, the |
58 // default local candidate mentioned above will not be allocated. Only the | 58 // default local candidate mentioned above will not be allocated. Only the |
59 // STUN candidate will be. | 59 // STUN candidate will be. |
60 PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE = 0x800, | 60 PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE = 0x800, |
61 // Disallow use of UDP when connecting to a relay server. Since proxy servers | 61 // Disallow use of UDP when connecting to a relay server. Since proxy servers |
62 // usually don't handle UDP, using UDP will leak the IP address. | 62 // usually don't handle UDP, using UDP will leak the IP address. |
63 PORTALLOCATOR_DISABLE_UDP_RELAY = 0x1000, | 63 PORTALLOCATOR_DISABLE_UDP_RELAY = 0x1000, |
64 | |
65 // When multiple networks exist, gather candidates only on the one with | |
66 // the lowest cost. So if both Wifi and Cellular networks exist, gather | |
pthatcher1
2016/05/17 20:44:28
Cellular => cellular
Wifi => wifi (or Wi-Fi)
honghaiz3
2016/05/18 05:55:02
Done.
| |
67 // only on the Wifi network. If a network type is "unknown", it has a cost | |
68 // lower than Cellular but higher than Wifi/Ethernet. So if an unknown network | |
69 // exists, Cellular networks will not be gathered on and if a Wifi network is | |
pthatcher1
2016/05/17 20:44:28
gathered on => gathered on it
honghaiz3
2016/05/18 05:55:02
Revised this.
| |
70 // present, "unknown" networks will not be gathered on. Doing so ensures that | |
pthatcher1
2016/05/17 20:44:28
networks will not be gathered on => networks will
honghaiz3
2016/05/18 05:55:02
Done.
| |
71 // even if a cellular network type was not detected initially, it would not be | |
72 // gathered on if a Wifi network is present. | |
73 PORTALLOCATOR_GATHER_LOW_COST_NETWORK_ONLY = 0x2000, | |
pthatcher1
2016/05/17 20:44:28
Following the existing naming scheme, would this b
honghaiz3
2016/05/18 05:55:02
Done.
| |
64 }; | 74 }; |
65 | 75 |
66 const uint32_t kDefaultPortAllocatorFlags = 0; | 76 const uint32_t kDefaultPortAllocatorFlags = 0; |
67 | 77 |
68 const uint32_t kDefaultStepDelay = 1000; // 1 sec step delay. | 78 const uint32_t kDefaultStepDelay = 1000; // 1 sec step delay. |
69 // As per RFC 5245 Appendix B.1, STUN transactions need to be paced at certain | 79 // As per RFC 5245 Appendix B.1, STUN transactions need to be paced at certain |
70 // internal. Less than 20ms is not acceptable. We choose 50ms as our default. | 80 // internal. Less than 20ms is not acceptable. We choose 50ms as our default. |
71 const uint32_t kMinimumStepDelay = 50; | 81 const uint32_t kMinimumStepDelay = 50; |
72 | 82 |
73 // CF = CANDIDATE FILTER | 83 // CF = CANDIDATE FILTER |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 int target_pooled_session_count_ = 0; | 343 int target_pooled_session_count_ = 0; |
334 // This variable represents the total number of pooled sessions | 344 // This variable represents the total number of pooled sessions |
335 // both owned by this class and taken by TakePooledSession. | 345 // both owned by this class and taken by TakePooledSession. |
336 int allocated_pooled_session_count_ = 0; | 346 int allocated_pooled_session_count_ = 0; |
337 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_; | 347 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_; |
338 }; | 348 }; |
339 | 349 |
340 } // namespace cricket | 350 } // namespace cricket |
341 | 351 |
342 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ | 352 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ |
OLD | NEW |