OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 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 |
11 #include "webrtc/pc/iceserverparsing.h" | 11 #include "webrtc/pc/iceserverparsing.h" |
12 | 12 |
13 #include <cctype> // For std::isdigit. | 13 #include <cctype> // For std::isdigit. |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "webrtc/base/arraysize.h" | 16 #include "webrtc/rtc_base/arraysize.h" |
17 | 17 |
18 namespace webrtc { | 18 namespace webrtc { |
19 | 19 |
20 // The min number of tokens must present in Turn host uri. | 20 // The min number of tokens must present in Turn host uri. |
21 // e.g. user@turn.example.org | 21 // e.g. user@turn.example.org |
22 static const size_t kTurnHostTokensNum = 2; | 22 static const size_t kTurnHostTokensNum = 2; |
23 // Number of tokens must be preset when TURN uri has transport param. | 23 // Number of tokens must be preset when TURN uri has transport param. |
24 static const size_t kTurnTransportTokensNum = 2; | 24 static const size_t kTurnTransportTokensNum = 2; |
25 // The default stun port. | 25 // The default stun port. |
26 static const int kDefaultStunPort = 3478; | 26 static const int kDefaultStunPort = 3478; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 // are performed in a well-defined order. | 302 // are performed in a well-defined order. |
303 int priority = static_cast<int>(turn_servers->size() - 1); | 303 int priority = static_cast<int>(turn_servers->size() - 1); |
304 for (cricket::RelayServerConfig& turn_server : *turn_servers) { | 304 for (cricket::RelayServerConfig& turn_server : *turn_servers) { |
305 // First in the list gets highest priority. | 305 // First in the list gets highest priority. |
306 turn_server.priority = priority--; | 306 turn_server.priority = priority--; |
307 } | 307 } |
308 return RTCErrorType::NONE; | 308 return RTCErrorType::NONE; |
309 } | 309 } |
310 | 310 |
311 } // namespace webrtc | 311 } // namespace webrtc |
OLD | NEW |