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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 DCHECK_EQ(fd, fd_); | 235 DCHECK_EQ(fd, fd_); |
236 | 236 |
237 if (event->in_events & EPOLLIN) { | 237 if (event->in_events & EPOLLIN) { |
238 while (connected() && ReadAndProcessPacket()) { | 238 while (connected() && ReadAndProcessPacket()) { |
239 } | 239 } |
240 } | 240 } |
241 if (connected() && (event->in_events & EPOLLOUT)) { | 241 if (connected() && (event->in_events & EPOLLOUT)) { |
242 session_->connection()->OnCanWrite(); | 242 session_->connection()->OnCanWrite(); |
243 } | 243 } |
244 if (event->in_events & EPOLLERR) { | 244 if (event->in_events & EPOLLERR) { |
245 DLOG(INFO) << "Epollerr"; | 245 DVLOG(1) << "Epollerr"; |
246 } | 246 } |
247 } | 247 } |
248 | 248 |
249 void QuicClient::OnClose(QuicDataStream* stream) { | 249 void QuicClient::OnClose(QuicDataStream* stream) { |
250 if (!print_response_) { | 250 if (!print_response_) { |
251 return; | 251 return; |
252 } | 252 } |
253 | 253 |
254 QuicSpdyClientStream* client_stream = | 254 QuicSpdyClientStream* client_stream = |
255 static_cast<QuicSpdyClientStream*>(stream); | 255 static_cast<QuicSpdyClientStream*>(stream); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 QuicEncryptedPacket packet(buf, bytes_read, false); | 307 QuicEncryptedPacket packet(buf, bytes_read, false); |
308 | 308 |
309 IPEndPoint client_address(client_ip, client_address_.port()); | 309 IPEndPoint client_address(client_ip, client_address_.port()); |
310 session_->connection()->ProcessUdpPacket( | 310 session_->connection()->ProcessUdpPacket( |
311 client_address, server_address, packet); | 311 client_address, server_address, packet); |
312 return true; | 312 return true; |
313 } | 313 } |
314 | 314 |
315 } // namespace tools | 315 } // namespace tools |
316 } // namespace net | 316 } // namespace net |
OLD | NEW |