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

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

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_client_session.h » ('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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 DummyPacketWriterFactory factory(writer); 192 DummyPacketWriterFactory factory(writer);
193 193
194 session_.reset(new QuicClientSession( 194 session_.reset(new QuicClientSession(
195 config_, 195 config_,
196 new QuicConnection(GenerateConnectionId(), 196 new QuicConnection(GenerateConnectionId(),
197 server_address_, 197 server_address_,
198 helper_.get(), 198 helper_.get(),
199 factory, 199 factory,
200 /* owns_writer= */ false, 200 /* owns_writer= */ false,
201 /* is_server= */ false, 201 /* is_server= */ false,
202 supported_versions_), 202 server_id_.is_https(),
203 server_id_.is_https())); 203 supported_versions_)));
204 204
205 // Reset |writer_| after |session_| so that the old writer outlives the old 205 // Reset |writer_| after |session_| so that the old writer outlives the old
206 // session. 206 // session.
207 if (writer_.get() != writer) { 207 if (writer_.get() != writer) {
208 writer_.reset(writer); 208 writer_.reset(writer);
209 } 209 }
210 session_->InitializeSession(server_id_, &crypto_config_); 210 session_->InitializeSession(server_id_, &crypto_config_);
211 return session_->CryptoConnect(); 211 return session_->CryptoConnect();
212 } 212 }
213 213
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 QuicEncryptedPacket packet(buf, bytes_read, false); 356 QuicEncryptedPacket packet(buf, bytes_read, false);
357 357
358 IPEndPoint client_address(client_ip, client_address_.port()); 358 IPEndPoint client_address(client_ip, client_address_.port());
359 session_->connection()->ProcessUdpPacket( 359 session_->connection()->ProcessUdpPacket(
360 client_address, server_address, packet); 360 client_address, server_address, packet);
361 return true; 361 return true;
362 } 362 }
363 363
364 } // namespace tools 364 } // namespace tools
365 } // namespace net 365 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698