OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/tools/quic/quic_simple_client.h" | 5 #include "net/tools/quic/quic_simple_client.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 225 } |
226 | 226 |
227 while (WaitForEvents()) {} | 227 while (WaitForEvents()) {} |
228 } | 228 } |
229 | 229 |
230 QuicSpdyClientStream* QuicSimpleClient::CreateReliableClientStream() { | 230 QuicSpdyClientStream* QuicSimpleClient::CreateReliableClientStream() { |
231 if (!connected()) { | 231 if (!connected()) { |
232 return nullptr; | 232 return nullptr; |
233 } | 233 } |
234 | 234 |
235 return session_->CreateOutgoingDataStream(); | 235 return session_->CreateOutgoingDynamicStream(); |
236 } | 236 } |
237 | 237 |
238 void QuicSimpleClient::WaitForStreamToClose(QuicStreamId id) { | 238 void QuicSimpleClient::WaitForStreamToClose(QuicStreamId id) { |
239 DCHECK(connected()); | 239 DCHECK(connected()); |
240 | 240 |
241 while (connected() && !session_->IsClosedStream(id)) { | 241 while (connected() && !session_->IsClosedStream(id)) { |
242 WaitForEvents(); | 242 WaitForEvents(); |
243 } | 243 } |
244 } | 244 } |
245 | 245 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 session_->connection()->ProcessUdpPacket(local_address, peer_address, packet); | 326 session_->connection()->ProcessUdpPacket(local_address, peer_address, packet); |
327 if (!session_->connection()->connected()) { | 327 if (!session_->connection()->connected()) { |
328 return false; | 328 return false; |
329 } | 329 } |
330 | 330 |
331 return true; | 331 return true; |
332 } | 332 } |
333 | 333 |
334 } // namespace tools | 334 } // namespace tools |
335 } // namespace net | 335 } // namespace net |
OLD | NEW |