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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 quic_stream_by_id_[stream->id()] = stream; | 127 quic_stream_by_id_[stream->id()] = stream; |
128 stream->SignalDataReceived.connect(this, &QuicDataTransport::OnDataReceived); | 128 stream->SignalDataReceived.connect(this, &QuicDataTransport::OnDataReceived); |
129 } | 129 } |
130 | 130 |
131 // Called when the first QUIC stream frame is received for incoming data. | 131 // Called when the first QUIC stream frame is received for incoming data. |
132 void QuicDataTransport::OnDataReceived(net::QuicStreamId id, | 132 void QuicDataTransport::OnDataReceived(net::QuicStreamId id, |
133 const char* data, | 133 const char* data, |
134 size_t len) { | 134 size_t len) { |
135 const auto& quic_stream_kv = quic_stream_by_id_.find(id); | 135 const auto& quic_stream_kv = quic_stream_by_id_.find(id); |
136 if (quic_stream_kv == quic_stream_by_id_.end()) { | 136 if (quic_stream_kv == quic_stream_by_id_.end()) { |
137 RTC_DCHECK(false); | 137 RTC_NOTREACHED(); |
138 return; | 138 return; |
139 } | 139 } |
140 cricket::ReliableQuicStream* stream = quic_stream_kv->second; | 140 cricket::ReliableQuicStream* stream = quic_stream_kv->second; |
141 stream->SignalDataReceived.disconnect(this); | 141 stream->SignalDataReceived.disconnect(this); |
142 quic_stream_by_id_.erase(id); | 142 quic_stream_by_id_.erase(id); |
143 // Read the data channel ID and message ID. | 143 // Read the data channel ID and message ID. |
144 int data_channel_id; | 144 int data_channel_id; |
145 uint64_t message_id; | 145 uint64_t message_id; |
146 size_t bytes_read; | 146 size_t bytes_read; |
147 if (!ParseQuicDataMessageHeader(data, len, &data_channel_id, &message_id, | 147 if (!ParseQuicDataMessageHeader(data, len, &data_channel_id, &message_id, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 if (transport_channel) { | 188 if (transport_channel) { |
189 network_thread_->Invoke<void>( | 189 network_thread_->Invoke<void>( |
190 RTC_FROM_HERE, | 190 RTC_FROM_HERE, |
191 rtc::Bind(&cricket::TransportController::DestroyTransportChannel_n, | 191 rtc::Bind(&cricket::TransportController::DestroyTransportChannel_n, |
192 transport_controller_, transport_channel->transport_name(), | 192 transport_controller_, transport_channel->transport_name(), |
193 cricket::ICE_CANDIDATE_COMPONENT_DEFAULT)); | 193 cricket::ICE_CANDIDATE_COMPONENT_DEFAULT)); |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 } // namespace webrtc | 197 } // namespace webrtc |
OLD | NEW |