| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 channel_->SignalGatheringState.connect( | 138 channel_->SignalGatheringState.connect( |
| 139 this, &QuicTransportChannel::OnGatheringState); | 139 this, &QuicTransportChannel::OnGatheringState); |
| 140 channel_->SignalCandidateGathered.connect( | 140 channel_->SignalCandidateGathered.connect( |
| 141 this, &QuicTransportChannel::OnCandidateGathered); | 141 this, &QuicTransportChannel::OnCandidateGathered); |
| 142 channel_->SignalRoleConflict.connect(this, | 142 channel_->SignalRoleConflict.connect(this, |
| 143 &QuicTransportChannel::OnRoleConflict); | 143 &QuicTransportChannel::OnRoleConflict); |
| 144 channel_->SignalRouteChange.connect(this, | 144 channel_->SignalRouteChange.connect(this, |
| 145 &QuicTransportChannel::OnRouteChange); | 145 &QuicTransportChannel::OnRouteChange); |
| 146 channel_->SignalSelectedCandidatePairChanged.connect( | 146 channel_->SignalSelectedCandidatePairChanged.connect( |
| 147 this, &QuicTransportChannel::OnSelectedCandidatePairChanged); | 147 this, &QuicTransportChannel::OnSelectedCandidatePairChanged); |
| 148 channel_->SignalConnectionRemoved.connect( | 148 channel_->SignalStateChanged.connect( |
| 149 this, &QuicTransportChannel::OnConnectionRemoved); | 149 this, &QuicTransportChannel::OnChannelStateChanged); |
| 150 channel_->SignalReceivingState.connect( | 150 channel_->SignalReceivingState.connect( |
| 151 this, &QuicTransportChannel::OnReceivingState); | 151 this, &QuicTransportChannel::OnReceivingState); |
| 152 | 152 |
| 153 // Set the QUIC connection timeout. | 153 // Set the QUIC connection timeout. |
| 154 config_.SetIdleConnectionStateLifetime( | 154 config_.SetIdleConnectionStateLifetime( |
| 155 net::QuicTime::Delta::FromSeconds(kIdleConnectionStateLifetime), | 155 net::QuicTime::Delta::FromSeconds(kIdleConnectionStateLifetime), |
| 156 net::QuicTime::Delta::FromSeconds(kIdleConnectionStateLifetime)); | 156 net::QuicTime::Delta::FromSeconds(kIdleConnectionStateLifetime)); |
| 157 // Set the bytes reserved for the QUIC connection ID to zero. | 157 // Set the bytes reserved for the QUIC connection ID to zero. |
| 158 config_.SetBytesForConnectionIdToSend(0); | 158 config_.SetBytesForConnectionIdToSend(0); |
| 159 } | 159 } |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 void QuicTransportChannel::OnSelectedCandidatePairChanged( | 395 void QuicTransportChannel::OnSelectedCandidatePairChanged( |
| 396 TransportChannel* channel, | 396 TransportChannel* channel, |
| 397 CandidatePairInterface* selected_candidate_pair, | 397 CandidatePairInterface* selected_candidate_pair, |
| 398 int last_sent_packet_id) { | 398 int last_sent_packet_id) { |
| 399 ASSERT(channel == channel_.get()); | 399 ASSERT(channel == channel_.get()); |
| 400 SignalSelectedCandidatePairChanged(this, selected_candidate_pair, | 400 SignalSelectedCandidatePairChanged(this, selected_candidate_pair, |
| 401 last_sent_packet_id); | 401 last_sent_packet_id); |
| 402 } | 402 } |
| 403 | 403 |
| 404 void QuicTransportChannel::OnConnectionRemoved(TransportChannelImpl* channel) { | 404 void QuicTransportChannel::OnChannelStateChanged( |
| 405 TransportChannelImpl* channel) { |
| 405 ASSERT(channel == channel_.get()); | 406 ASSERT(channel == channel_.get()); |
| 406 SignalConnectionRemoved(this); | 407 SignalStateChanged(this); |
| 407 } | 408 } |
| 408 | 409 |
| 409 bool QuicTransportChannel::MaybeStartQuic() { | 410 bool QuicTransportChannel::MaybeStartQuic() { |
| 410 if (!channel_->writable()) { | 411 if (!channel_->writable()) { |
| 411 LOG_J(LS_ERROR, this) << "Couldn't start QUIC handshake."; | 412 LOG_J(LS_ERROR, this) << "Couldn't start QUIC handshake."; |
| 412 return false; | 413 return false; |
| 413 } | 414 } |
| 414 if (!CreateQuicSession() || !StartQuicHandshake()) { | 415 if (!CreateQuicSession() || !StartQuicHandshake()) { |
| 415 LOG_J(LS_WARNING, this) | 416 LOG_J(LS_WARNING, this) |
| 416 << "Underlying channel is writable but cannot start " | 417 << "Underlying channel is writable but cannot start " |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 return quic_->CreateOutgoingDynamicStream(priority); | 588 return quic_->CreateOutgoingDynamicStream(priority); |
| 588 } | 589 } |
| 589 return nullptr; | 590 return nullptr; |
| 590 } | 591 } |
| 591 | 592 |
| 592 void QuicTransportChannel::OnIncomingStream(ReliableQuicStream* stream) { | 593 void QuicTransportChannel::OnIncomingStream(ReliableQuicStream* stream) { |
| 593 SignalIncomingStream(stream); | 594 SignalIncomingStream(stream); |
| 594 } | 595 } |
| 595 | 596 |
| 596 } // namespace cricket | 597 } // namespace cricket |
| OLD | NEW |