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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 worker_thread_(rtc::Thread::Current()), | 94 worker_thread_(rtc::Thread::Current()), |
95 channel_(channel), | 95 channel_(channel), |
96 downward_(NULL), | 96 downward_(NULL), |
97 dtls_state_(STATE_NONE), | 97 dtls_state_(STATE_NONE), |
98 ssl_role_(rtc::SSL_CLIENT), | 98 ssl_role_(rtc::SSL_CLIENT), |
99 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) { | 99 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) { |
100 channel_->SignalWritableState.connect(this, | 100 channel_->SignalWritableState.connect(this, |
101 &DtlsTransportChannelWrapper::OnWritableState); | 101 &DtlsTransportChannelWrapper::OnWritableState); |
102 channel_->SignalReadPacket.connect(this, | 102 channel_->SignalReadPacket.connect(this, |
103 &DtlsTransportChannelWrapper::OnReadPacket); | 103 &DtlsTransportChannelWrapper::OnReadPacket); |
| 104 channel_->SignalSentPacket.connect( |
| 105 this, &DtlsTransportChannelWrapper::OnSentPacket); |
104 channel_->SignalReadyToSend.connect(this, | 106 channel_->SignalReadyToSend.connect(this, |
105 &DtlsTransportChannelWrapper::OnReadyToSend); | 107 &DtlsTransportChannelWrapper::OnReadyToSend); |
106 channel_->SignalGatheringState.connect( | 108 channel_->SignalGatheringState.connect( |
107 this, &DtlsTransportChannelWrapper::OnGatheringState); | 109 this, &DtlsTransportChannelWrapper::OnGatheringState); |
108 channel_->SignalCandidateGathered.connect( | 110 channel_->SignalCandidateGathered.connect( |
109 this, &DtlsTransportChannelWrapper::OnCandidateGathered); | 111 this, &DtlsTransportChannelWrapper::OnCandidateGathered); |
110 channel_->SignalRoleConflict.connect(this, | 112 channel_->SignalRoleConflict.connect(this, |
111 &DtlsTransportChannelWrapper::OnRoleConflict); | 113 &DtlsTransportChannelWrapper::OnRoleConflict); |
112 channel_->SignalRouteChange.connect(this, | 114 channel_->SignalRouteChange.connect(this, |
113 &DtlsTransportChannelWrapper::OnRouteChange); | 115 &DtlsTransportChannelWrapper::OnRouteChange); |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 // Signal this upwards as a bypass packet. | 506 // Signal this upwards as a bypass packet. |
505 SignalReadPacket(this, data, size, packet_time, PF_SRTP_BYPASS); | 507 SignalReadPacket(this, data, size, packet_time, PF_SRTP_BYPASS); |
506 } | 508 } |
507 break; | 509 break; |
508 case STATE_CLOSED: | 510 case STATE_CLOSED: |
509 // This shouldn't be happening. Drop the packet | 511 // This shouldn't be happening. Drop the packet |
510 break; | 512 break; |
511 } | 513 } |
512 } | 514 } |
513 | 515 |
| 516 void DtlsTransportChannelWrapper::OnSentPacket( |
| 517 TransportChannel* channel, |
| 518 const rtc::SentPacket& packet_sent) { |
| 519 ASSERT(rtc::Thread::Current() == worker_thread_); |
| 520 ASSERT(channel == channel_); |
| 521 |
| 522 SignalSentPacket(this, packet_sent); |
| 523 } |
| 524 |
514 void DtlsTransportChannelWrapper::OnReadyToSend(TransportChannel* channel) { | 525 void DtlsTransportChannelWrapper::OnReadyToSend(TransportChannel* channel) { |
515 if (writable()) { | 526 if (writable()) { |
516 SignalReadyToSend(this); | 527 SignalReadyToSend(this); |
517 } | 528 } |
518 } | 529 } |
519 | 530 |
520 void DtlsTransportChannelWrapper::OnDtlsEvent(rtc::StreamInterface* dtls, | 531 void DtlsTransportChannelWrapper::OnDtlsEvent(rtc::StreamInterface* dtls, |
521 int sig, int err) { | 532 int sig, int err) { |
522 ASSERT(rtc::Thread::Current() == worker_thread_); | 533 ASSERT(rtc::Thread::Current() == worker_thread_); |
523 ASSERT(dtls == dtls_.get()); | 534 ASSERT(dtls == dtls_.get()); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 SignalRouteChange(this, candidate); | 625 SignalRouteChange(this, candidate); |
615 } | 626 } |
616 | 627 |
617 void DtlsTransportChannelWrapper::OnConnectionRemoved( | 628 void DtlsTransportChannelWrapper::OnConnectionRemoved( |
618 TransportChannelImpl* channel) { | 629 TransportChannelImpl* channel) { |
619 ASSERT(channel == channel_); | 630 ASSERT(channel == channel_); |
620 SignalConnectionRemoved(this); | 631 SignalConnectionRemoved(this); |
621 } | 632 } |
622 | 633 |
623 } // namespace cricket | 634 } // namespace cricket |
OLD | NEW |