Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Side by Side Diff: net/tools/quic/quic_client.cc

Issue 2403233003: Automated rollback of internal change 130388085. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 156
157 void QuicClient::OnEvent(int fd, EpollEvent* event) { 157 void QuicClient::OnEvent(int fd, EpollEvent* event) {
158 DCHECK_EQ(fd, GetLatestFD()); 158 DCHECK_EQ(fd, GetLatestFD());
159 159
160 if (event->in_events & EPOLLIN) { 160 if (event->in_events & EPOLLIN) {
161 bool more_to_read = true; 161 bool more_to_read = true;
162 while (connected() && more_to_read) { 162 while (connected() && more_to_read) {
163 more_to_read = packet_reader_->ReadAndDispatchPackets( 163 more_to_read = packet_reader_->ReadAndDispatchPackets(
164 GetLatestFD(), QuicClient::GetLatestClientAddress().port(), 164 GetLatestFD(), QuicClient::GetLatestClientAddress().port(),
165 false /* potentially_small_mtu */, *helper()->GetClock(), this, 165 *helper()->GetClock(), this,
166 overflow_supported_ ? &packets_dropped_ : nullptr); 166 overflow_supported_ ? &packets_dropped_ : nullptr);
167 } 167 }
168 } 168 }
169 if (connected() && (event->in_events & EPOLLOUT)) { 169 if (connected() && (event->in_events & EPOLLOUT)) {
170 writer()->SetWritable(); 170 writer()->SetWritable();
171 session()->connection()->OnCanWrite(); 171 session()->connection()->OnCanWrite();
172 } 172 }
173 if (event->in_events & EPOLLERR) { 173 if (event->in_events & EPOLLERR) {
174 DVLOG(1) << "Epollerr"; 174 DVLOG(1) << "Epollerr";
175 } 175 }
(...skipping 19 matching lines...) Expand all
195 return fd_address_map_.back().first; 195 return fd_address_map_.back().first;
196 } 196 }
197 197
198 void QuicClient::ProcessPacket(const IPEndPoint& self_address, 198 void QuicClient::ProcessPacket(const IPEndPoint& self_address,
199 const IPEndPoint& peer_address, 199 const IPEndPoint& peer_address,
200 const QuicReceivedPacket& packet) { 200 const QuicReceivedPacket& packet) {
201 session()->ProcessUdpPacket(self_address, peer_address, packet); 201 session()->ProcessUdpPacket(self_address, peer_address, packet);
202 } 202 }
203 203
204 } // namespace net 204 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698