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

Unified Diff: net/socket/tcp_client_socket_win.cc

Issue 6990036: Deciding best connection to schedule requests on based on cwnd and idle time (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 6 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
Index: net/socket/tcp_client_socket_win.cc
===================================================================
--- net/socket/tcp_client_socket_win.cc (revision 86260)
+++ net/socket/tcp_client_socket_win.cc (working copy)
@@ -331,6 +331,7 @@
core_->write_overlapped_.hEvent = WSACreateEvent();
+ connect_start_time_ = base::Time::Now();
if (!connect(socket_, ai->ai_addr, static_cast<int>(ai->ai_addrlen))) {
// Connected without waiting!
//
@@ -369,6 +370,9 @@
net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT_ATTEMPT, params);
if (result == OK) {
+ rtt_ms_ = static_cast<double>((base::Time::Now() -
+ connect_start_time_).InMicroseconds())
+ / 1000.0;
use_history_.set_was_ever_connected();
return OK; // Done!
}
@@ -535,6 +539,7 @@
base::MemoryDebug::MarkAsInitialized(core_->read_buffer_.buf, num);
base::StatsCounter read_bytes("tcp.read_bytes");
read_bytes.Add(num);
+ num_bytes_read_ += num;
if (num > 0)
use_history_.set_was_used_to_convey_data();
LogByteTransfer(net_log_, NetLog::TYPE_SOCKET_BYTES_RECEIVED, num,

Powered by Google App Engine
This is Rietveld 408576698