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

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

Issue 995423003: Add a chromium based simple QUIC client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix iOS Created 5 years, 9 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_simple_client.h » ('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 dccec95aa663d4d6a31574f80075c4cf455dda97..f8f75314a24a7acf74b5263821fecf433483f92f 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -27,6 +27,7 @@
#endif
using std::string;
+using std::vector;
namespace net {
namespace tools {
@@ -252,19 +253,19 @@ void QuicClient::SendRequest(const BalsaHeaders& headers,
stream->set_visitor(this);
}
-void QuicClient::SendRequestAndWaitForResponse(const BalsaHeaders& headers,
- StringPiece body,
- bool fin) {
- SendRequest(headers, "", true);
- while (WaitForEvents()) {
- }
+void QuicClient::SendRequestAndWaitForResponse(
+ const BalsaHeaders& headers,
+ StringPiece body,
+ bool fin) {
+ SendRequest(headers, body, fin);
+ while (WaitForEvents()) {}
}
void QuicClient::SendRequestsAndWaitForResponse(
- const base::CommandLine::StringVector& args) {
- for (size_t i = 0; i < args.size(); ++i) {
+ const vector<string>& url_list) {
+ for (size_t i = 0; i < url_list.size(); ++i) {
BalsaHeaders headers;
- headers.SetRequestFirstlineFromStringPieces("GET", args[i], "HTTP/1.1");
+ headers.SetRequestFirstlineFromStringPieces("GET", url_list[i], "HTTP/1.1");
SendRequest(headers, "", true);
}
while (WaitForEvents()) {}
@@ -282,7 +283,7 @@ void QuicClient::WaitForStreamToClose(QuicStreamId id) {
DCHECK(connected());
while (connected() && !session_->IsClosedStream(id)) {
- epoll_server_->WaitForEventsAndExecuteCallbacks();
+ WaitForEvents();
}
}
@@ -290,7 +291,7 @@ void QuicClient::WaitForCryptoHandshakeConfirmed() {
DCHECK(connected());
while (connected() && !session_->IsCryptoHandshakeConfirmed()) {
- epoll_server_->WaitForEventsAndExecuteCallbacks();
+ WaitForEvents();
}
}
« no previous file with comments | « net/tools/quic/quic_client.h ('k') | net/tools/quic/quic_simple_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698