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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 // Signal this upwards as a bypass packet. | 505 // Signal this upwards as a bypass packet. |
504 SignalReadPacket(this, data, size, packet_time, PF_SRTP_BYPASS); | 506 SignalReadPacket(this, data, size, packet_time, PF_SRTP_BYPASS); |
505 } | 507 } |
506 break; | 508 break; |
507 case STATE_CLOSED: | 509 case STATE_CLOSED: |
508 // This shouldn't be happening. Drop the packet | 510 // This shouldn't be happening. Drop the packet |
509 break; | 511 break; |
510 } | 512 } |
511 } | 513 } |
512 | 514 |
| 515 void DtlsTransportChannelWrapper::OnSentPacket( |
| 516 TransportChannel* channel, |
| 517 const rtc::SentPacket& sent_packet) { |
| 518 ASSERT(rtc::Thread::Current() == worker_thread_); |
| 519 ASSERT(channel == channel_); |
| 520 |
| 521 SignalSentPacket(this, sent_packet); |
| 522 } |
| 523 |
513 void DtlsTransportChannelWrapper::OnReadyToSend(TransportChannel* channel) { | 524 void DtlsTransportChannelWrapper::OnReadyToSend(TransportChannel* channel) { |
514 if (writable()) { | 525 if (writable()) { |
515 SignalReadyToSend(this); | 526 SignalReadyToSend(this); |
516 } | 527 } |
517 } | 528 } |
518 | 529 |
519 void DtlsTransportChannelWrapper::OnDtlsEvent(rtc::StreamInterface* dtls, | 530 void DtlsTransportChannelWrapper::OnDtlsEvent(rtc::StreamInterface* dtls, |
520 int sig, int err) { | 531 int sig, int err) { |
521 ASSERT(rtc::Thread::Current() == worker_thread_); | 532 ASSERT(rtc::Thread::Current() == worker_thread_); |
522 ASSERT(dtls == dtls_.get()); | 533 ASSERT(dtls == dtls_.get()); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 SignalRouteChange(this, candidate); | 624 SignalRouteChange(this, candidate); |
614 } | 625 } |
615 | 626 |
616 void DtlsTransportChannelWrapper::OnConnectionRemoved( | 627 void DtlsTransportChannelWrapper::OnConnectionRemoved( |
617 TransportChannelImpl* channel) { | 628 TransportChannelImpl* channel) { |
618 ASSERT(channel == channel_); | 629 ASSERT(channel == channel_); |
619 SignalConnectionRemoved(this); | 630 SignalConnectionRemoved(this); |
620 } | 631 } |
621 | 632 |
622 } // namespace cricket | 633 } // namespace cricket |
OLD | NEW |