| 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, | |
| 93 TransportChannelImpl* channel) | 92 TransportChannelImpl* channel) |
| 94 : TransportChannelImpl(channel->transport_name(), channel->component()), | 93 : TransportChannelImpl(channel->transport_name(), channel->component()), |
| 95 transport_(transport), | |
| 96 worker_thread_(rtc::Thread::Current()), | 94 worker_thread_(rtc::Thread::Current()), |
| 97 channel_(channel), | 95 channel_(channel), |
| 98 downward_(NULL), | 96 downward_(NULL), |
| 99 ssl_role_(rtc::SSL_CLIENT), | 97 ssl_role_(rtc::SSL_CLIENT), |
| 100 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_12) { | 98 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_12) { |
| 101 channel_->SignalWritableState.connect(this, | 99 channel_->SignalWritableState.connect(this, |
| 102 &DtlsTransportChannelWrapper::OnWritableState); | 100 &DtlsTransportChannelWrapper::OnWritableState); |
| 103 channel_->SignalReadPacket.connect(this, | 101 channel_->SignalReadPacket.connect(this, |
| 104 &DtlsTransportChannelWrapper::OnReadPacket); | 102 &DtlsTransportChannelWrapper::OnReadPacket); |
| 105 channel_->SignalSentPacket.connect( | 103 channel_->SignalSentPacket.connect( |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 | 628 |
| 631 void DtlsTransportChannelWrapper::Reconnect() { | 629 void DtlsTransportChannelWrapper::Reconnect() { |
| 632 set_dtls_state(DTLS_TRANSPORT_NEW); | 630 set_dtls_state(DTLS_TRANSPORT_NEW); |
| 633 set_writable(false); | 631 set_writable(false); |
| 634 if (channel_->writable()) { | 632 if (channel_->writable()) { |
| 635 OnWritableState(channel_); | 633 OnWritableState(channel_); |
| 636 } | 634 } |
| 637 } | 635 } |
| 638 | 636 |
| 639 } // namespace cricket | 637 } // namespace cricket |
| OLD | NEW |