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

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

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 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_epoll_clock.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 5054eb91dd35ae2c08cc58dcf184d2e43a18d902..0206c3f963d84bf57065bce0eb40d48fba23883e 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -39,9 +39,20 @@ QuicClient::QuicClient(IPEndPoint server_address,
initialized_(false),
packets_dropped_(0),
overflow_supported_(false) {
- epoll_server_.set_timeout_in_us(50 * 1000);
config_.SetDefaults();
- crypto_config_.SetDefaults();
+}
+
+QuicClient::QuicClient(IPEndPoint server_address,
+ const string& server_hostname,
+ const QuicConfig& config)
+ : server_address_(server_address),
+ server_hostname_(server_hostname),
+ config_(config),
+ local_port_(0),
+ fd_(-1),
+ initialized_(false),
+ packets_dropped_(0),
+ overflow_supported_(false) {
}
QuicClient::~QuicClient() {
@@ -52,7 +63,10 @@ QuicClient::~QuicClient() {
}
bool QuicClient::Initialize() {
+ epoll_server_.set_timeout_in_us(50 * 1000);
+ crypto_config_.SetDefaults();
int address_family = server_address_.GetSockAddrFamily();
+
fd_ = socket(address_family, SOCK_DGRAM | SOCK_NONBLOCK, IPPROTO_UDP);
if (fd_ < 0) {
LOG(ERROR) << "CreateSocket() failed: " << strerror(errno);
« no previous file with comments | « net/tools/quic/quic_client.h ('k') | net/tools/quic/quic_epoll_clock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698