| 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. | 5 // A binary wrapper for QuicClient. |
| 6 // Connects to a host using QUIC, and sends requests to the provided URLS. | 6 // Connects to a host using QUIC, and sends requests to the provided URLS. |
| 7 // | 7 // |
| 8 // Example usage: | 8 // Example usage: |
| 9 // quic_client --address=127.0.0.1 --port=6122 --hostname=www.google.com \ | 9 // quic_client --address=127.0.0.1 --port=6122 --hostname=www.google.com |
| 10 // http://www.google.com/index.html http://www.google.com/favicon.ico | 10 // http://www.google.com/index.html http://www.google.com/favicon.ico |
| 11 | 11 |
| 12 #include <iostream> | 12 #include <iostream> |
| 13 | 13 |
| 14 #include "base/at_exit.h" | 14 #include "base/at_exit.h" |
| 15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
| 18 #include "net/base/ip_endpoint.h" | 18 #include "net/base/ip_endpoint.h" |
| 19 #include "net/base/privacy_mode.h" | 19 #include "net/base/privacy_mode.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 if (!client.Connect()) { | 119 if (!client.Connect()) { |
| 120 LOG(ERROR) << "Client failed to connect to host: " | 120 LOG(ERROR) << "Client failed to connect to host: " |
| 121 << FLAGS_hostname << ":" << FLAGS_port; | 121 << FLAGS_hostname << ":" << FLAGS_port; |
| 122 return 1; | 122 return 1; |
| 123 } | 123 } |
| 124 | 124 |
| 125 // Send a GET request for each supplied url. | 125 // Send a GET request for each supplied url. |
| 126 client.SendRequestsAndWaitForResponse(urls); | 126 client.SendRequestsAndWaitForResponse(urls); |
| 127 return 0; | 127 return 0; |
| 128 } | 128 } |
| OLD | NEW |