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

Side by Side Diff: net/socket/stream_socket.h

Issue 7251004: Deciding best connection to schedule requests on based on cwnd and idle time (Reopened after revert) (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Syncing to head Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_server_socket_unittest.cc ('k') | net/socket/tcp_client_socket_libevent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SOCKET_STREAM_SOCKET_H_ 5 #ifndef NET_SOCKET_STREAM_SOCKET_H_
6 #define NET_SOCKET_STREAM_SOCKET_H_ 6 #define NET_SOCKET_STREAM_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/time.h"
9 #include "net/base/net_log.h" 10 #include "net/base/net_log.h"
10 #include "net/socket/socket.h" 11 #include "net/socket/socket.h"
11 12
12 namespace net { 13 namespace net {
13 14
14 class AddressList; 15 class AddressList;
15 class IPEndPoint; 16 class IPEndPoint;
16 17
17 class NET_TEST StreamSocket : public Socket { 18 class NET_TEST StreamSocket : public Socket {
18 public: 19 public:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 73
73 // Returns true if the underlying transport socket ever had any reads or 74 // Returns true if the underlying transport socket ever had any reads or
74 // writes. StreamSockets layered on top of transport sockets should forward 75 // writes. StreamSockets layered on top of transport sockets should forward
75 // this call to the transport socket. 76 // this call to the transport socket.
76 virtual bool WasEverUsed() const = 0; 77 virtual bool WasEverUsed() const = 0;
77 78
78 // Returns true if the underlying transport socket is using TCP FastOpen. 79 // Returns true if the underlying transport socket is using TCP FastOpen.
79 // TCP FastOpen is an experiment with sending data in the TCP SYN packet. 80 // TCP FastOpen is an experiment with sending data in the TCP SYN packet.
80 virtual bool UsingTCPFastOpen() const = 0; 81 virtual bool UsingTCPFastOpen() const = 0;
81 82
83 // Returns the number of bytes successfully read from this socket.
84 virtual int64 NumBytesRead() const = 0;
85
86 // Returns the connection setup time of this socket.
87 virtual base::TimeDelta GetConnectTimeMicros() const = 0;
wtc 2011/07/01 16:27:36 Can you rename this method GetConnectTime? I don'
88
82 protected: 89 protected:
83 // The following class is only used to gather statistics about the history of 90 // The following class is only used to gather statistics about the history of
84 // a socket. It is only instantiated and used in basic sockets, such as 91 // a socket. It is only instantiated and used in basic sockets, such as
85 // TCPClientSocket* instances. Other classes that are derived from 92 // TCPClientSocket* instances. Other classes that are derived from
86 // StreamSocket should forward any potential settings to their underlying 93 // StreamSocket should forward any potential settings to their underlying
87 // transport sockets. 94 // transport sockets.
88 class UseHistory { 95 class UseHistory {
89 public: 96 public:
90 UseHistory(); 97 UseHistory();
91 ~UseHistory(); 98 ~UseHistory();
(...skipping 26 matching lines...) Expand all
118 // identify the motivation. 125 // identify the motivation.
119 bool omnibox_speculation_; 126 bool omnibox_speculation_;
120 bool subresource_speculation_; 127 bool subresource_speculation_;
121 DISALLOW_COPY_AND_ASSIGN(UseHistory); 128 DISALLOW_COPY_AND_ASSIGN(UseHistory);
122 }; 129 };
123 }; 130 };
124 131
125 } // namespace net 132 } // namespace net
126 133
127 #endif // NET_SOCKET_STREAM_SOCKET_H_ 134 #endif // NET_SOCKET_STREAM_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_server_socket_unittest.cc ('k') | net/socket/tcp_client_socket_libevent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698