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 23 matching lines...) Expand all Loading... |
34 desc.ice_ufrag.length() > ICE_UFRAG_MAX_LENGTH) { | 34 desc.ice_ufrag.length() > ICE_UFRAG_MAX_LENGTH) { |
35 return false; | 35 return false; |
36 } | 36 } |
37 if (desc.ice_pwd.length() < ICE_PWD_MIN_LENGTH || | 37 if (desc.ice_pwd.length() < ICE_PWD_MIN_LENGTH || |
38 desc.ice_pwd.length() > ICE_PWD_MAX_LENGTH) { | 38 desc.ice_pwd.length() > ICE_PWD_MAX_LENGTH) { |
39 return false; | 39 return false; |
40 } | 40 } |
41 return true; | 41 return true; |
42 } | 42 } |
43 | 43 |
| 44 ConnectionInfo::ConnectionInfo() |
| 45 : best_connection(false), |
| 46 writable(false), |
| 47 receiving(false), |
| 48 timeout(false), |
| 49 new_connection(false), |
| 50 rtt(0), |
| 51 sent_total_bytes(0), |
| 52 sent_bytes_second(0), |
| 53 sent_discarded_packets(0), |
| 54 sent_total_packets(0), |
| 55 sent_ping_requests_total(0), |
| 56 sent_ping_requests_before_first_response(0), |
| 57 sent_ping_responses(0), |
| 58 recv_total_bytes(0), |
| 59 recv_bytes_second(0), |
| 60 recv_ping_requests(0), |
| 61 recv_ping_responses(0), |
| 62 key(nullptr), |
| 63 state(IceCandidatePairState::WAITING), |
| 64 priority(0) {} |
| 65 |
44 bool BadTransportDescription(const std::string& desc, std::string* err_desc) { | 66 bool BadTransportDescription(const std::string& desc, std::string* err_desc) { |
45 if (err_desc) { | 67 if (err_desc) { |
46 *err_desc = desc; | 68 *err_desc = desc; |
47 } | 69 } |
48 LOG(LS_ERROR) << desc; | 70 LOG(LS_ERROR) << desc; |
49 return false; | 71 return false; |
50 } | 72 } |
51 | 73 |
52 bool IceCredentialsChanged(const std::string& old_ufrag, | 74 bool IceCredentialsChanged(const std::string& old_ufrag, |
53 const std::string& old_pwd, | 75 const std::string& old_pwd, |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 } | 474 } |
453 | 475 |
454 // If local is passive, local will act as server. | 476 // If local is passive, local will act as server. |
455 } | 477 } |
456 | 478 |
457 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; | 479 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; |
458 return true; | 480 return true; |
459 } | 481 } |
460 | 482 |
461 } // namespace cricket | 483 } // namespace cricket |
OLD | NEW |