| 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 // A binary wrapper for QuicClient. Connects to --hostname via --address | 5 // A binary wrapper for QuicClient. Connects to --hostname via --address |
| 6 // on --port and requests URLs specified on the command line. | 6 // on --port and requests URLs specified on the command line. |
| 7 // Pass --secure to check the certificates using proof verifier. | 7 // Pass --secure to check the certificates using proof verifier. |
| 8 // Pass --initial_flow_control_window to specify the size of the initial flow | 8 // Pass --initial_flow_control_window to specify the size of the initial flow |
| 9 // control receive window to advertise to server. | 9 // control receive window to advertise to server. |
| 10 // | 10 // |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 << " hostname: " << FLAGS_hostname | 74 << " hostname: " << FLAGS_hostname |
| 75 << " secure: " << FLAGS_secure; | 75 << " secure: " << FLAGS_secure; |
| 76 | 76 |
| 77 base::AtExitManager exit_manager; | 77 base::AtExitManager exit_manager; |
| 78 | 78 |
| 79 net::IPAddressNumber addr; | 79 net::IPAddressNumber addr; |
| 80 CHECK(net::ParseIPLiteralToNumber(FLAGS_address, &addr)); | 80 CHECK(net::ParseIPLiteralToNumber(FLAGS_address, &addr)); |
| 81 // TODO(rjshade): Set version on command line. | 81 // TODO(rjshade): Set version on command line. |
| 82 net::tools::QuicClient client( | 82 net::tools::QuicClient client( |
| 83 net::IPEndPoint(addr, FLAGS_port), | 83 net::IPEndPoint(addr, FLAGS_port), |
| 84 net::QuicSessionKey(FLAGS_hostname, FLAGS_port, FLAGS_secure, | 84 net::QuicServerId(FLAGS_hostname, FLAGS_port, FLAGS_secure, |
| 85 net::kPrivacyModeDisabled), | 85 net::kPrivacyModeDisabled), |
| 86 net::QuicSupportedVersions(), true, FLAGS_initial_flow_control_window); | 86 net::QuicSupportedVersions(), true, FLAGS_initial_flow_control_window); |
| 87 | 87 |
| 88 client.Initialize(); | 88 client.Initialize(); |
| 89 | 89 |
| 90 if (!client.Connect()) return 1; | 90 if (!client.Connect()) return 1; |
| 91 | 91 |
| 92 client.SendRequestsAndWaitForResponse(line->GetArgs()); | 92 client.SendRequestsAndWaitForResponse(line->GetArgs()); |
| 93 return 0; | 93 return 0; |
| 94 } | 94 } |
| OLD | NEW |