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_client.h" | 5 #include "net/tools/quic/quic_client.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <netinet/in.h> | 8 #include <netinet/in.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <sys/epoll.h> | 10 #include <sys/epoll.h> |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 SendRequest(headers, "", true); | 288 SendRequest(headers, "", true); |
289 } | 289 } |
290 while (WaitForEvents()) {} | 290 while (WaitForEvents()) {} |
291 } | 291 } |
292 | 292 |
293 QuicSpdyClientStream* QuicClient::CreateReliableClientStream() { | 293 QuicSpdyClientStream* QuicClient::CreateReliableClientStream() { |
294 if (!connected()) { | 294 if (!connected()) { |
295 return nullptr; | 295 return nullptr; |
296 } | 296 } |
297 | 297 |
298 return session_->CreateOutgoingDataStream(); | 298 return session_->CreateOutgoingDynamicStream(); |
299 } | 299 } |
300 | 300 |
301 void QuicClient::WaitForStreamToClose(QuicStreamId id) { | 301 void QuicClient::WaitForStreamToClose(QuicStreamId id) { |
302 DCHECK(connected()); | 302 DCHECK(connected()); |
303 | 303 |
304 while (connected() && !session_->IsClosedStream(id)) { | 304 while (connected() && !session_->IsClosedStream(id)) { |
305 WaitForEvents(); | 305 WaitForEvents(); |
306 } | 306 } |
307 } | 307 } |
308 | 308 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 QuicEncryptedPacket packet(buf, bytes_read, false); | 420 QuicEncryptedPacket packet(buf, bytes_read, false); |
421 | 421 |
422 IPEndPoint client_address(client_ip, client_address_.port()); | 422 IPEndPoint client_address(client_ip, client_address_.port()); |
423 session_->connection()->ProcessUdpPacket( | 423 session_->connection()->ProcessUdpPacket( |
424 client_address, server_address, packet); | 424 client_address, server_address, packet); |
425 return true; | 425 return true; |
426 } | 426 } |
427 | 427 |
428 } // namespace tools | 428 } // namespace tools |
429 } // namespace net | 429 } // namespace net |
OLD | NEW |