OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include "net/base/net_log.h" | 8 #include "net/base/net_log.h" |
9 #include "net/socket/next_proto.h" | 9 #include "net/socket/next_proto.h" |
10 #include "net/socket/socket.h" | 10 #include "net/socket/socket.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 | 72 |
73 // Returns true if the socket ever had any reads or writes. StreamSockets | 73 // Returns true if the socket ever had any reads or writes. StreamSockets |
74 // layered on top of transport sockets should return if their own Read() or | 74 // layered on top of transport sockets should return if their own Read() or |
75 // Write() methods had been called, not the underlying transport's. | 75 // Write() methods had been called, not the underlying transport's. |
76 virtual bool WasEverUsed() const = 0; | 76 virtual bool WasEverUsed() const = 0; |
77 | 77 |
78 // Returns true if the underlying transport socket is using TCP FastOpen. | 78 // 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. | 79 // TCP FastOpen is an experiment with sending data in the TCP SYN packet. |
80 virtual bool UsingTCPFastOpen() const = 0; | 80 virtual bool UsingTCPFastOpen() const = 0; |
81 | 81 |
82 // Enables use of TCP FastOpen for the underlying transport socket. | |
83 virtual void EnableTCPFastOpen() {} | |
Randy Smith (Not in Mondays)
2014/08/11 19:07:01
I dislike the idea of the stream socket abstractio
| |
84 | |
82 // Returns true if NPN was negotiated during the connection of this socket. | 85 // Returns true if NPN was negotiated during the connection of this socket. |
83 virtual bool WasNpnNegotiated() const = 0; | 86 virtual bool WasNpnNegotiated() const = 0; |
84 | 87 |
85 // Returns the protocol negotiated via NPN for this socket, or | 88 // Returns the protocol negotiated via NPN for this socket, or |
86 // kProtoUnknown will be returned if NPN is not applicable. | 89 // kProtoUnknown will be returned if NPN is not applicable. |
87 virtual NextProto GetNegotiatedProtocol() const = 0; | 90 virtual NextProto GetNegotiatedProtocol() const = 0; |
88 | 91 |
89 // Gets the SSL connection information of the socket. Returns false if | 92 // Gets the SSL connection information of the socket. Returns false if |
90 // SSL was not used by this socket. | 93 // SSL was not used by this socket. |
91 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0; | 94 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 // identify the motivation. | 132 // identify the motivation. |
130 bool omnibox_speculation_; | 133 bool omnibox_speculation_; |
131 bool subresource_speculation_; | 134 bool subresource_speculation_; |
132 DISALLOW_COPY_AND_ASSIGN(UseHistory); | 135 DISALLOW_COPY_AND_ASSIGN(UseHistory); |
133 }; | 136 }; |
134 }; | 137 }; |
135 | 138 |
136 } // namespace net | 139 } // namespace net |
137 | 140 |
138 #endif // NET_SOCKET_STREAM_SOCKET_H_ | 141 #endif // NET_SOCKET_STREAM_SOCKET_H_ |
OLD | NEW |