Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: webrtc/p2p/base/dtlstransportchannel.cc

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing updated_options Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
520 SignalSentPacket(this, sent_packet);
521 }
522
513 void DtlsTransportChannelWrapper::OnReadyToSend(TransportChannel* channel) { 523 void DtlsTransportChannelWrapper::OnReadyToSend(TransportChannel* channel) {
514 if (writable()) { 524 if (writable()) {
515 SignalReadyToSend(this); 525 SignalReadyToSend(this);
516 } 526 }
517 } 527 }
518 528
519 void DtlsTransportChannelWrapper::OnDtlsEvent(rtc::StreamInterface* dtls, 529 void DtlsTransportChannelWrapper::OnDtlsEvent(rtc::StreamInterface* dtls,
520 int sig, int err) { 530 int sig, int err) {
521 ASSERT(rtc::Thread::Current() == worker_thread_); 531 ASSERT(rtc::Thread::Current() == worker_thread_);
522 ASSERT(dtls == dtls_.get()); 532 ASSERT(dtls == dtls_.get());
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 SignalRouteChange(this, candidate); 623 SignalRouteChange(this, candidate);
614 } 624 }
615 625
616 void DtlsTransportChannelWrapper::OnConnectionRemoved( 626 void DtlsTransportChannelWrapper::OnConnectionRemoved(
617 TransportChannelImpl* channel) { 627 TransportChannelImpl* channel) {
618 ASSERT(channel == channel_); 628 ASSERT(channel == channel_);
619 SignalConnectionRemoved(this); 629 SignalConnectionRemoved(this);
620 } 630 }
621 631
622 } // namespace cricket 632 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698