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

Side by Side Diff: net/socket/tcp_client_socket_win.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: Reuploading from google.com account 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/tcp_client_socket_libevent.cc ('k') | net/socket/tcp_client_socket_win.cc » ('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_TCP_CLIENT_SOCKET_WIN_H_ 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
6 #define NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <winsock2.h> 9 #include <winsock2.h>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/time.h"
12 #include "base/threading/non_thread_safe.h" 13 #include "base/threading/non_thread_safe.h"
13 #include "net/base/address_list.h" 14 #include "net/base/address_list.h"
14 #include "net/base/completion_callback.h" 15 #include "net/base/completion_callback.h"
15 #include "net/base/net_log.h" 16 #include "net/base/net_log.h"
16 #include "net/socket/stream_socket.h" 17 #include "net/socket/stream_socket.h"
17 18
18 namespace net { 19 namespace net {
19 20
20 class BoundNetLog; 21 class BoundNetLog;
21 22
(...skipping 24 matching lines...) Expand all
46 virtual void Disconnect(); 47 virtual void Disconnect();
47 virtual bool IsConnected() const; 48 virtual bool IsConnected() const;
48 virtual bool IsConnectedAndIdle() const; 49 virtual bool IsConnectedAndIdle() const;
49 virtual int GetPeerAddress(AddressList* address) const; 50 virtual int GetPeerAddress(AddressList* address) const;
50 virtual int GetLocalAddress(IPEndPoint* address) const; 51 virtual int GetLocalAddress(IPEndPoint* address) const;
51 virtual const BoundNetLog& NetLog() const { return net_log_; } 52 virtual const BoundNetLog& NetLog() const { return net_log_; }
52 virtual void SetSubresourceSpeculation(); 53 virtual void SetSubresourceSpeculation();
53 virtual void SetOmniboxSpeculation(); 54 virtual void SetOmniboxSpeculation();
54 virtual bool WasEverUsed() const; 55 virtual bool WasEverUsed() const;
55 virtual bool UsingTCPFastOpen() const; 56 virtual bool UsingTCPFastOpen() const;
57 virtual int64 NumBytesRead() const { return num_bytes_read_; }
58 virtual int GetConnectTimeMicros() const { return connect_time_micros_; }
56 59
57 // Socket methods: 60 // Socket methods:
58 // Multiple outstanding requests are not supported. 61 // Multiple outstanding requests are not supported.
59 // Full duplex mode (reading and writing at the same time) is supported 62 // Full duplex mode (reading and writing at the same time) is supported
60 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); 63 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
61 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); 64 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
62 65
63 virtual bool SetReceiveBufferSize(int32 size); 66 virtual bool SetReceiveBufferSize(int32 size);
64 virtual bool SetSendBufferSize(int32 size); 67 virtual bool SetSendBufferSize(int32 size);
65 68
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 137
135 BoundNetLog net_log_; 138 BoundNetLog net_log_;
136 139
137 // This socket was previously disconnected and has not been re-connected. 140 // This socket was previously disconnected and has not been re-connected.
138 bool previously_disconnected_; 141 bool previously_disconnected_;
139 142
140 // Record of connectivity and transmissions, for use in speculative connection 143 // Record of connectivity and transmissions, for use in speculative connection
141 // histograms. 144 // histograms.
142 UseHistory use_history_; 145 UseHistory use_history_;
143 146
147 base::TimeTicks connect_start_time_;
148 int64 num_bytes_read_;
149 int connect_time_micros_;
150
144 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin); 151 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin);
145 }; 152 };
146 153
147 } // namespace net 154 } // namespace net
148 155
149 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ 156 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_libevent.cc ('k') | net/socket/tcp_client_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698