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

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

Issue 1215543003: Add UMA for the kernel's TCP RTT estimate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 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
« no previous file with comments | « net/socket/tcp_client_socket.cc ('k') | net/socket/tcp_socket_libevent.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SOCKET_LIBEVENT_H_ 5 #ifndef NET_SOCKET_TCP_SOCKET_LIBEVENT_H_
6 #define NET_SOCKET_TCP_SOCKET_LIBEVENT_H_ 6 #define NET_SOCKET_TCP_SOCKET_LIBEVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h"
12 #include "net/base/address_family.h" 13 #include "net/base/address_family.h"
13 #include "net/base/completion_callback.h" 14 #include "net/base/completion_callback.h"
14 #include "net/base/net_export.h" 15 #include "net/base/net_export.h"
15 #include "net/log/net_log.h" 16 #include "net/log/net_log.h"
16 17
17 namespace net { 18 namespace net {
18 19
19 class AddressList; 20 class AddressList;
20 class IOBuffer; 21 class IOBuffer;
21 class IPEndPoint; 22 class IPEndPoint;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // The commonly used options for client sockets and accepted sockets: 57 // The commonly used options for client sockets and accepted sockets:
57 // - SetNoDelay(true); 58 // - SetNoDelay(true);
58 // - SetKeepAlive(true, 45). 59 // - SetKeepAlive(true, 45).
59 void SetDefaultOptionsForClient(); 60 void SetDefaultOptionsForClient();
60 int SetAddressReuse(bool allow); 61 int SetAddressReuse(bool allow);
61 int SetReceiveBufferSize(int32 size); 62 int SetReceiveBufferSize(int32 size);
62 int SetSendBufferSize(int32 size); 63 int SetSendBufferSize(int32 size);
63 bool SetKeepAlive(bool enable, int delay); 64 bool SetKeepAlive(bool enable, int delay);
64 bool SetNoDelay(bool no_delay); 65 bool SetNoDelay(bool no_delay);
65 66
67 // Gets the estimated RTT. Returns false if the RTT is
68 // unavailable. May also return false when estimated RTT is 0.
69 bool GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const;
Jana 2015/07/08 12:33:29 Since 0 is a special case that indicates failure,
Bryan McQuade 2015/07/08 13:26:07 Thanks Jana! I'll defer to Matt on the decision he
70
66 void Close(); 71 void Close();
67 72
68 // Setter/Getter methods for TCP FastOpen socket option. 73 // Setter/Getter methods for TCP FastOpen socket option.
69 bool UsingTCPFastOpen() const; 74 bool UsingTCPFastOpen() const;
70 void EnableTCPFastOpenIfSupported(); 75 void EnableTCPFastOpenIfSupported();
71 76
72 bool IsValid() const; 77 bool IsValid() const;
73 78
74 // Marks the start/end of a series of connect attempts for logging purpose. 79 // Marks the start/end of a series of connect attempts for logging purpose.
75 // 80 //
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 bool logging_multiple_connect_attempts_; 210 bool logging_multiple_connect_attempts_;
206 211
207 BoundNetLog net_log_; 212 BoundNetLog net_log_;
208 213
209 DISALLOW_COPY_AND_ASSIGN(TCPSocketLibevent); 214 DISALLOW_COPY_AND_ASSIGN(TCPSocketLibevent);
210 }; 215 };
211 216
212 } // namespace net 217 } // namespace net
213 218
214 #endif // NET_SOCKET_TCP_SOCKET_LIBEVENT_H_ 219 #endif // NET_SOCKET_TCP_SOCKET_LIBEVENT_H_
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket.cc ('k') | net/socket/tcp_socket_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698