Chromium Code Reviews| 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 29 matching lines...) Expand all Loading... | |
| 40 MSG_CONFIG_STOP, | 40 MSG_CONFIG_STOP, |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 const int PHASE_UDP = 0; | 43 const int PHASE_UDP = 0; |
| 44 const int PHASE_RELAY = 1; | 44 const int PHASE_RELAY = 1; |
| 45 const int PHASE_TCP = 2; | 45 const int PHASE_TCP = 2; |
| 46 const int PHASE_SSLTCP = 3; | 46 const int PHASE_SSLTCP = 3; |
| 47 | 47 |
| 48 const int kNumPhases = 4; | 48 const int kNumPhases = 4; |
| 49 | 49 |
| 50 // Gets protocol priority: UDP > TCP > SSLTCP. | 50 // Gets protocol priority: UDP == TLS > TCP > SSLTCP. |
| 51 int GetProtocolPriority(cricket::ProtocolType protocol) { | 51 int GetProtocolPriority(cricket::ProtocolType protocol) { |
| 52 switch (protocol) { | 52 switch (protocol) { |
| 53 case cricket::PROTO_UDP: | 53 case cricket::PROTO_UDP: |
| 54 case cricket::PROTO_TLS: | |
|
honghaiz3
2017/06/27 20:56:30
Maybe consider PROTO_UDP to be 3?
| |
| 54 return 2; | 55 return 2; |
| 55 case cricket::PROTO_TCP: | 56 case cricket::PROTO_TCP: |
| 56 return 1; | 57 return 1; |
| 57 case cricket::PROTO_SSLTCP: | 58 case cricket::PROTO_SSLTCP: |
| 58 return 0; | 59 return 0; |
| 59 default: | 60 default: |
| 60 RTC_NOTREACHED(); | 61 RTC_NOTREACHED(); |
| 61 return 0; | 62 return 0; |
| 62 } | 63 } |
| 63 } | 64 } |
| (...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1528 ServerAddresses servers; | 1529 ServerAddresses servers; |
| 1529 for (size_t i = 0; i < relays.size(); ++i) { | 1530 for (size_t i = 0; i < relays.size(); ++i) { |
| 1530 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { | 1531 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { |
| 1531 servers.insert(relays[i].ports.front().address); | 1532 servers.insert(relays[i].ports.front().address); |
| 1532 } | 1533 } |
| 1533 } | 1534 } |
| 1534 return servers; | 1535 return servers; |
| 1535 } | 1536 } |
| 1536 | 1537 |
| 1537 } // namespace cricket | 1538 } // namespace cricket |
| OLD | NEW |