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

Unified Diff: net/socket/client_socket_pool_base.h

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: fixing release build policy check 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/client_socket_pool_base.h
===================================================================
--- net/socket/client_socket_pool_base.h (revision 88995)
+++ net/socket/client_socket_pool_base.h (working copy)
@@ -50,6 +50,13 @@
class ClientSocketHandle;
+// Returns the client socket reuse policy.
+NET_API int GetSocketReusePolicy();
willchan no longer on Chromium 2011/06/16 09:52:44 Is this called outside net/? If not, we don't need
Gagan 2011/06/16 11:49:29 Was getting used only in http_stream. Removed NET_
+
+// Sets the client socket reuse policy.
+// NOTE: 'policy' should be a valid ClientSocketReusePolicy enum value.
+NET_API void SetSocketReusePolicy(int policy);
+
// ConnectJob provides an abstract interface for "connecting" a socket.
// The connection may involve host resolution, tcp connection, ssl connection,
// etc.
@@ -167,6 +174,17 @@
NO_IDLE_SOCKETS = 0x1, // Do not return an idle socket. Create a new one.
};
+ enum ClientSocketReusePolicy {
+ // Socket with largest amount of bytes transferred.
+ USE_WARMEST_SOCKET = 0,
+
+ // Socket which scores highest on large bytes transferred and low idle time.
+ USE_WARM_SOCKET = 1,
+
+ // Socket which was most recently used.
+ USE_LAST_ACCESSED_SOCKET = 2,
+ };
+
class NET_TEST Request {
public:
Request(ClientSocketHandle* handle,

Powered by Google App Engine
This is Rietveld 408576698