| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 bool StreamInterfaceChannel::OnPacketReceived(const char* data, size_t size) { | 81 bool StreamInterfaceChannel::OnPacketReceived(const char* data, size_t size) { |
| 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 void StreamInterfaceChannel::Close() { |
| 92 packets_.Clear(); |
| 93 state_ = rtc::SS_CLOSED; |
| 94 } |
| 95 |
| 91 DtlsTransportChannelWrapper::DtlsTransportChannelWrapper( | 96 DtlsTransportChannelWrapper::DtlsTransportChannelWrapper( |
| 92 Transport* transport, | 97 Transport* transport, |
| 93 TransportChannelImpl* channel) | 98 TransportChannelImpl* channel) |
| 94 : TransportChannelImpl(channel->transport_name(), channel->component()), | 99 : TransportChannelImpl(channel->transport_name(), channel->component()), |
| 95 transport_(transport), | 100 transport_(transport), |
| 96 worker_thread_(rtc::Thread::Current()), | 101 worker_thread_(rtc::Thread::Current()), |
| 97 channel_(channel), | 102 channel_(channel), |
| 98 downward_(NULL), | 103 downward_(NULL), |
| 99 ssl_role_(rtc::SSL_CLIENT), | 104 ssl_role_(rtc::SSL_CLIENT), |
| 100 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) { | 105 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) { |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 | 635 |
| 631 void DtlsTransportChannelWrapper::Reconnect() { | 636 void DtlsTransportChannelWrapper::Reconnect() { |
| 632 set_dtls_state(DTLS_TRANSPORT_NEW); | 637 set_dtls_state(DTLS_TRANSPORT_NEW); |
| 633 set_writable(false); | 638 set_writable(false); |
| 634 if (channel_->writable()) { | 639 if (channel_->writable()) { |
| 635 OnWritableState(channel_); | 640 OnWritableState(channel_); |
| 636 } | 641 } |
| 637 } | 642 } |
| 638 | 643 |
| 639 } // namespace cricket | 644 } // namespace cricket |
| OLD | NEW |