| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 channel_->SignalReadyToSend.connect(this, | 132 channel_->SignalReadyToSend.connect(this, |
| 133 &QuicTransportChannel::OnReadyToSend); | 133 &QuicTransportChannel::OnReadyToSend); |
| 134 channel_->SignalGatheringState.connect( | 134 channel_->SignalGatheringState.connect( |
| 135 this, &QuicTransportChannel::OnGatheringState); | 135 this, &QuicTransportChannel::OnGatheringState); |
| 136 channel_->SignalCandidateGathered.connect( | 136 channel_->SignalCandidateGathered.connect( |
| 137 this, &QuicTransportChannel::OnCandidateGathered); | 137 this, &QuicTransportChannel::OnCandidateGathered); |
| 138 channel_->SignalRoleConflict.connect(this, | 138 channel_->SignalRoleConflict.connect(this, |
| 139 &QuicTransportChannel::OnRoleConflict); | 139 &QuicTransportChannel::OnRoleConflict); |
| 140 channel_->SignalRouteChange.connect(this, | 140 channel_->SignalRouteChange.connect(this, |
| 141 &QuicTransportChannel::OnRouteChange); | 141 &QuicTransportChannel::OnRouteChange); |
| 142 channel_->SignalSelectedCandidatePairChanged.connect( |
| 143 this, &QuicTransportChannel::OnSelectedCandidatePairChanged); |
| 142 channel_->SignalConnectionRemoved.connect( | 144 channel_->SignalConnectionRemoved.connect( |
| 143 this, &QuicTransportChannel::OnConnectionRemoved); | 145 this, &QuicTransportChannel::OnConnectionRemoved); |
| 144 channel_->SignalReceivingState.connect( | 146 channel_->SignalReceivingState.connect( |
| 145 this, &QuicTransportChannel::OnReceivingState); | 147 this, &QuicTransportChannel::OnReceivingState); |
| 146 | 148 |
| 147 // Set the QUIC connection timeout. | 149 // Set the QUIC connection timeout. |
| 148 config_.SetIdleConnectionStateLifetime( | 150 config_.SetIdleConnectionStateLifetime( |
| 149 net::QuicTime::Delta::FromSeconds(kIdleConnectionStateLifetime), | 151 net::QuicTime::Delta::FromSeconds(kIdleConnectionStateLifetime), |
| 150 net::QuicTime::Delta::FromSeconds(kIdleConnectionStateLifetime)); | 152 net::QuicTime::Delta::FromSeconds(kIdleConnectionStateLifetime)); |
| 151 // Set the bytes reserved for the QUIC connection ID to zero. | 153 // Set the bytes reserved for the QUIC connection ID to zero. |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 ASSERT(channel == channel_); | 377 ASSERT(channel == channel_); |
| 376 SignalRoleConflict(this); | 378 SignalRoleConflict(this); |
| 377 } | 379 } |
| 378 | 380 |
| 379 void QuicTransportChannel::OnRouteChange(TransportChannel* channel, | 381 void QuicTransportChannel::OnRouteChange(TransportChannel* channel, |
| 380 const Candidate& candidate) { | 382 const Candidate& candidate) { |
| 381 ASSERT(channel == channel_); | 383 ASSERT(channel == channel_); |
| 382 SignalRouteChange(this, candidate); | 384 SignalRouteChange(this, candidate); |
| 383 } | 385 } |
| 384 | 386 |
| 387 void QuicTransportChannel::OnSelectedCandidatePairChanged( |
| 388 TransportChannel* channel, |
| 389 CandidatePairInterface* selected_candidate_pair) { |
| 390 ASSERT(channel == channel_); |
| 391 SignalSelectedCandidatePairChanged(this, selected_candidate_pair); |
| 392 } |
| 393 |
| 385 void QuicTransportChannel::OnConnectionRemoved(TransportChannelImpl* channel) { | 394 void QuicTransportChannel::OnConnectionRemoved(TransportChannelImpl* channel) { |
| 386 ASSERT(channel == channel_); | 395 ASSERT(channel == channel_); |
| 387 SignalConnectionRemoved(this); | 396 SignalConnectionRemoved(this); |
| 388 } | 397 } |
| 389 | 398 |
| 390 bool QuicTransportChannel::MaybeStartQuic() { | 399 bool QuicTransportChannel::MaybeStartQuic() { |
| 391 if (!channel_->writable()) { | 400 if (!channel_->writable()) { |
| 392 LOG_J(ERROR, this) << "Couldn't start QUIC handshake."; | 401 LOG_J(ERROR, this) << "Couldn't start QUIC handshake."; |
| 393 return false; | 402 return false; |
| 394 } | 403 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 quic_->connection()->OnCanWrite(); | 552 quic_->connection()->OnCanWrite(); |
| 544 } | 553 } |
| 545 | 554 |
| 546 void QuicTransportChannel::set_quic_state(QuicTransportState state) { | 555 void QuicTransportChannel::set_quic_state(QuicTransportState state) { |
| 547 LOG_J(VERBOSE, this) << "set_quic_state from:" << quic_state_ << " to " | 556 LOG_J(VERBOSE, this) << "set_quic_state from:" << quic_state_ << " to " |
| 548 << state; | 557 << state; |
| 549 quic_state_ = state; | 558 quic_state_ = state; |
| 550 } | 559 } |
| 551 | 560 |
| 552 } // namespace cricket | 561 } // namespace cricket |
| OLD | NEW |