From 5e6efa537dc4c06912f0bb42f16991c7ee7eafbc Mon Sep 17 00:00:00 2001 From: "gagansingh@google.com" Date: Mon, 27 Jun 2011 17:26:41 +0000 Subject: Warmth of a connection (cwnd) is estimated by the amount of data written to the socket. Choosing the warmest connection would mean faster resource load times. idle time is the time a socket has remained idle (no http requests being served on it). Probability of server resetting a connection increases with idle time duration. Using a cost function that takes into account bytes transferred and idle time to pick best connection to schedule http requests on. CODEREVIEW done in http://codereview.chromium.org/6990036/ Contributed by gagansingh@google.com Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=90373 Reverted: http://codereview.chromium.org/7255002 :( Have fixed 2 things since: 1. Removed LOG(ERROR) from http_basic_stream.cc that was causing layout tests to fail. 2. Initialized class variables in http_basic_stream.cc that was causing uninitialized memory bugs in valgrind: http://code.google.com/p/chromium/issues/detail?id=87423 Review URL: http://codereview.chromium.org/7251004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90601 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/jingle_glue/ssl_socket_adapter.cc | 10 ++++++++++ remoting/jingle_glue/ssl_socket_adapter.h | 2 ++ 2 files changed, 12 insertions(+) (limited to 'remoting/jingle_glue') diff --git a/remoting/jingle_glue/ssl_socket_adapter.cc b/remoting/jingle_glue/ssl_socket_adapter.cc index 101ce3d..59b42f9 100644 --- a/remoting/jingle_glue/ssl_socket_adapter.cc +++ b/remoting/jingle_glue/ssl_socket_adapter.cc @@ -270,6 +270,16 @@ bool TransportSocket::UsingTCPFastOpen() const { return false; } +int64 TransportSocket::NumBytesRead() const { + NOTREACHED(); + return -1; +} + +base::TimeDelta TransportSocket::GetConnectTimeMicros() const { + NOTREACHED(); + return base::TimeDelta::FromMicroseconds(-1); +} + int TransportSocket::Read(net::IOBuffer* buf, int buf_len, net::CompletionCallback* callback) { DCHECK(buf); diff --git a/remoting/jingle_glue/ssl_socket_adapter.h b/remoting/jingle_glue/ssl_socket_adapter.h index 9acd3f7..388bd1c 100644 --- a/remoting/jingle_glue/ssl_socket_adapter.h +++ b/remoting/jingle_glue/ssl_socket_adapter.h @@ -52,6 +52,8 @@ class TransportSocket : public net::StreamSocket, public sigslot::has_slots<> { virtual void SetOmniboxSpeculation(); virtual bool WasEverUsed() const; virtual bool UsingTCPFastOpen() const; + virtual int64 NumBytesRead() const; + virtual base::TimeDelta GetConnectTimeMicros() const; // net::Socket implementation -- cgit v1.1