| 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 } | 385 } |
| 386 if (connected() && (event->in_events & EPOLLOUT)) { | 386 if (connected() && (event->in_events & EPOLLOUT)) { |
| 387 writer()->SetWritable(); | 387 writer()->SetWritable(); |
| 388 session()->connection()->OnCanWrite(); | 388 session()->connection()->OnCanWrite(); |
| 389 } | 389 } |
| 390 if (event->in_events & EPOLLERR) { | 390 if (event->in_events & EPOLLERR) { |
| 391 DVLOG(1) << "Epollerr"; | 391 DVLOG(1) << "Epollerr"; |
| 392 } | 392 } |
| 393 } | 393 } |
| 394 | 394 |
| 395 void QuicClient::OnClose(QuicDataStream* stream) { | 395 void QuicClient::OnClose(QuicSpdyStream* stream) { |
| 396 DCHECK(stream != nullptr); | 396 DCHECK(stream != nullptr); |
| 397 QuicSpdyClientStream* client_stream = | 397 QuicSpdyClientStream* client_stream = |
| 398 static_cast<QuicSpdyClientStream*>(stream); | 398 static_cast<QuicSpdyClientStream*>(stream); |
| 399 BalsaHeaders headers; | 399 BalsaHeaders headers; |
| 400 SpdyBalsaUtils::SpdyHeadersToResponseHeaders(client_stream->headers(), | 400 SpdyBalsaUtils::SpdyHeadersToResponseHeaders(client_stream->headers(), |
| 401 &headers); | 401 &headers); |
| 402 | 402 |
| 403 if (response_listener_.get() != nullptr) { | 403 if (response_listener_.get() != nullptr) { |
| 404 response_listener_->OnCompleteResponse( | 404 response_listener_->OnCompleteResponse( |
| 405 stream->id(), headers, client_stream->data()); | 405 stream->id(), headers, client_stream->data()); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 QuicEncryptedPacket packet(buf, bytes_read, false); | 463 QuicEncryptedPacket packet(buf, bytes_read, false); |
| 464 | 464 |
| 465 IPEndPoint client_address(client_ip, client_address_.port()); | 465 IPEndPoint client_address(client_ip, client_address_.port()); |
| 466 session()->connection()->ProcessUdpPacket(client_address, server_address, | 466 session()->connection()->ProcessUdpPacket(client_address, server_address, |
| 467 packet); | 467 packet); |
| 468 return true; | 468 return true; |
| 469 } | 469 } |
| 470 | 470 |
| 471 } // namespace tools | 471 } // namespace tools |
| 472 } // namespace net | 472 } // namespace net |
| OLD | NEW |