OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 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 <memory> |
11 #include <utility> | 12 #include <utility> |
12 | 13 |
13 #include "webrtc/p2p/base/dtlstransportchannel.h" | 14 #include "webrtc/p2p/base/dtlstransportchannel.h" |
14 | 15 |
15 #include "webrtc/p2p/base/common.h" | 16 #include "webrtc/p2p/base/common.h" |
16 #include "webrtc/base/buffer.h" | 17 #include "webrtc/base/buffer.h" |
17 #include "webrtc/base/checks.h" | 18 #include "webrtc/base/checks.h" |
18 #include "webrtc/base/dscp.h" | 19 #include "webrtc/base/dscp.h" |
19 #include "webrtc/base/messagequeue.h" | 20 #include "webrtc/base/messagequeue.h" |
20 #include "webrtc/base/sslstreamadapter.h" | 21 #include "webrtc/base/sslstreamadapter.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 return false; | 244 return false; |
244 } | 245 } |
245 | 246 |
246 if (reconnect) { | 247 if (reconnect) { |
247 Reconnect(); | 248 Reconnect(); |
248 } | 249 } |
249 | 250 |
250 return true; | 251 return true; |
251 } | 252 } |
252 | 253 |
253 rtc::scoped_ptr<rtc::SSLCertificate> | 254 std::unique_ptr<rtc::SSLCertificate> |
254 DtlsTransportChannelWrapper::GetRemoteSSLCertificate() const { | 255 DtlsTransportChannelWrapper::GetRemoteSSLCertificate() const { |
255 if (!dtls_) { | 256 if (!dtls_) { |
256 return nullptr; | 257 return nullptr; |
257 } | 258 } |
258 | 259 |
259 return dtls_->GetPeerCertificate(); | 260 return dtls_->GetPeerCertificate(); |
260 } | 261 } |
261 | 262 |
262 bool DtlsTransportChannelWrapper::SetupDtls() { | 263 bool DtlsTransportChannelWrapper::SetupDtls() { |
263 StreamInterfaceChannel* downward = new StreamInterfaceChannel(channel_); | 264 StreamInterfaceChannel* downward = new StreamInterfaceChannel(channel_); |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 | 654 |
654 void DtlsTransportChannelWrapper::Reconnect() { | 655 void DtlsTransportChannelWrapper::Reconnect() { |
655 set_dtls_state(DTLS_TRANSPORT_NEW); | 656 set_dtls_state(DTLS_TRANSPORT_NEW); |
656 set_writable(false); | 657 set_writable(false); |
657 if (channel_->writable()) { | 658 if (channel_->writable()) { |
658 OnWritableState(channel_); | 659 OnWritableState(channel_); |
659 } | 660 } |
660 } | 661 } |
661 | 662 |
662 } // namespace cricket | 663 } // namespace cricket |
OLD | NEW |