| 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 |
| 11 #include "webrtc/p2p/base/jseptransport.h" | 11 #include "webrtc/p2p/base/jseptransport.h" |
| 12 | 12 |
| 13 #include <memory> | 13 #include <memory> |
| 14 #include <utility> // for std::pair | 14 #include <utility> // for std::pair |
| 15 | 15 |
| 16 #include "webrtc/base/bind.h" | |
| 17 #include "webrtc/base/checks.h" | |
| 18 #include "webrtc/base/logging.h" | |
| 19 #include "webrtc/p2p/base/candidate.h" | 16 #include "webrtc/p2p/base/candidate.h" |
| 20 #include "webrtc/p2p/base/dtlstransportchannel.h" | 17 #include "webrtc/p2p/base/dtlstransportchannel.h" |
| 21 #include "webrtc/p2p/base/p2pconstants.h" | 18 #include "webrtc/p2p/base/p2pconstants.h" |
| 22 #include "webrtc/p2p/base/p2ptransportchannel.h" | 19 #include "webrtc/p2p/base/p2ptransportchannel.h" |
| 23 #include "webrtc/p2p/base/port.h" | 20 #include "webrtc/p2p/base/port.h" |
| 21 #include "webrtc/rtc_base/bind.h" |
| 22 #include "webrtc/rtc_base/checks.h" |
| 23 #include "webrtc/rtc_base/logging.h" |
| 24 | 24 |
| 25 namespace cricket { | 25 namespace cricket { |
| 26 | 26 |
| 27 static bool VerifyIceParams(const TransportDescription& desc) { | 27 static bool VerifyIceParams(const TransportDescription& desc) { |
| 28 // For legacy protocols. | 28 // For legacy protocols. |
| 29 if (desc.ice_ufrag.empty() && desc.ice_pwd.empty()) | 29 if (desc.ice_ufrag.empty() && desc.ice_pwd.empty()) |
| 30 return true; | 30 return true; |
| 31 | 31 |
| 32 if (desc.ice_ufrag.length() < ICE_UFRAG_MIN_LENGTH || | 32 if (desc.ice_ufrag.length() < ICE_UFRAG_MIN_LENGTH || |
| 33 desc.ice_ufrag.length() > ICE_UFRAG_MAX_LENGTH) { | 33 desc.ice_ufrag.length() > ICE_UFRAG_MAX_LENGTH) { |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 } | 493 } |
| 494 | 494 |
| 495 // If local is passive, local will act as server. | 495 // If local is passive, local will act as server. |
| 496 } | 496 } |
| 497 | 497 |
| 498 ssl_role_.emplace(is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER); | 498 ssl_role_.emplace(is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER); |
| 499 return true; | 499 return true; |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace cricket | 502 } // namespace cricket |
| OLD | NEW |