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

Unified Diff: net/tools/quic/quic_client.cc

Issue 1240953002: Allow QuicClient to set connection MTU before the handshake is sent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Cleanup_changes_97160447
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_client.h ('k') | net/tools/quic/quic_client_bin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client.cc
diff --git a/net/tools/quic/quic_client.cc b/net/tools/quic/quic_client.cc
index 73648d916719b61fd9a94f40eac4e5a785b2e737..2abedb6e377121b8aafeb6e04a6afb4d471ea5a1 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -41,19 +41,11 @@ QuicClient::QuicClient(IPEndPoint server_address,
const QuicServerId& server_id,
const QuicVersionVector& supported_versions,
EpollServer* epoll_server)
- : server_address_(server_address),
- server_id_(server_id),
- local_port_(0),
- epoll_server_(epoll_server),
- fd_(-1),
- helper_(CreateQuicConnectionHelper()),
- initialized_(false),
- packets_dropped_(0),
- overflow_supported_(false),
- supported_versions_(supported_versions),
- store_response_(false),
- latest_response_code_(-1) {
-}
+ : QuicClient(server_address,
+ server_id,
+ supported_versions,
+ QuicConfig(),
+ epoll_server) {}
QuicClient::QuicClient(IPEndPoint server_address,
const QuicServerId& server_id,
@@ -72,8 +64,8 @@ QuicClient::QuicClient(IPEndPoint server_address,
overflow_supported_(false),
supported_versions_(supported_versions),
store_response_(false),
- latest_response_code_(-1) {
-}
+ latest_response_code_(-1),
+ initial_max_packet_length_(0) {}
QuicClient::~QuicClient() {
if (connected()) {
@@ -218,6 +210,9 @@ void QuicClient::StartConnect() {
/* owns_writer= */ false, Perspective::IS_CLIENT,
server_id_.is_https(), supported_versions_),
server_id_, &crypto_config_));
+ if (initial_max_packet_length_ != 0) {
+ session_->connection()->set_max_packet_length(initial_max_packet_length_);
+ }
// Reset |writer_| after |session_| so that the old writer outlives the old
// session.
« no previous file with comments | « net/tools/quic/quic_client.h ('k') | net/tools/quic/quic_client_bin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698