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 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // We force a read event here to ensure that we don't overflow our queue. | 82 // We force a read event here to ensure that we don't overflow our queue. |
83 bool ret = packets_.WriteBack(data, size, NULL); | 83 bool ret = packets_.WriteBack(data, size, NULL); |
84 RTC_CHECK(ret) << "Failed to write packet to queue."; | 84 RTC_CHECK(ret) << "Failed to write packet to queue."; |
85 if (ret) { | 85 if (ret) { |
86 SignalEvent(this, rtc::SE_READ, 0); | 86 SignalEvent(this, rtc::SE_READ, 0); |
87 } | 87 } |
88 return ret; | 88 return ret; |
89 } | 89 } |
90 | 90 |
91 DtlsTransportChannelWrapper::DtlsTransportChannelWrapper( | 91 DtlsTransportChannelWrapper::DtlsTransportChannelWrapper( |
| 92 Transport* transport, |
92 TransportChannelImpl* channel) | 93 TransportChannelImpl* channel) |
93 : TransportChannelImpl(channel->transport_name(), channel->component()), | 94 : TransportChannelImpl(channel->transport_name(), channel->component()), |
| 95 transport_(transport), |
94 worker_thread_(rtc::Thread::Current()), | 96 worker_thread_(rtc::Thread::Current()), |
95 channel_(channel), | 97 channel_(channel), |
96 downward_(NULL), | 98 downward_(NULL), |
97 ssl_role_(rtc::SSL_CLIENT), | 99 ssl_role_(rtc::SSL_CLIENT), |
98 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_12) { | 100 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_12) { |
99 channel_->SignalWritableState.connect(this, | 101 channel_->SignalWritableState.connect(this, |
100 &DtlsTransportChannelWrapper::OnWritableState); | 102 &DtlsTransportChannelWrapper::OnWritableState); |
101 channel_->SignalReadPacket.connect(this, | 103 channel_->SignalReadPacket.connect(this, |
102 &DtlsTransportChannelWrapper::OnReadPacket); | 104 &DtlsTransportChannelWrapper::OnReadPacket); |
103 channel_->SignalSentPacket.connect( | 105 channel_->SignalSentPacket.connect( |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 630 |
629 void DtlsTransportChannelWrapper::Reconnect() { | 631 void DtlsTransportChannelWrapper::Reconnect() { |
630 set_dtls_state(DTLS_TRANSPORT_NEW); | 632 set_dtls_state(DTLS_TRANSPORT_NEW); |
631 set_writable(false); | 633 set_writable(false); |
632 if (channel_->writable()) { | 634 if (channel_->writable()) { |
633 OnWritableState(channel_); | 635 OnWritableState(channel_); |
634 } | 636 } |
635 } | 637 } |
636 | 638 |
637 } // namespace cricket | 639 } // namespace cricket |
OLD | NEW |