| OLD | NEW |
| 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_LIBEVENT_H_ | 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 virtual void Disconnect(); | 46 virtual void Disconnect(); |
| 47 virtual bool IsConnected() const; | 47 virtual bool IsConnected() const; |
| 48 virtual bool IsConnectedAndIdle() const; | 48 virtual bool IsConnectedAndIdle() const; |
| 49 virtual int GetPeerAddress(AddressList* address) const; | 49 virtual int GetPeerAddress(AddressList* address) const; |
| 50 virtual int GetLocalAddress(IPEndPoint* address) const; | 50 virtual int GetLocalAddress(IPEndPoint* address) const; |
| 51 virtual const BoundNetLog& NetLog() const; | 51 virtual const BoundNetLog& NetLog() const; |
| 52 virtual void SetSubresourceSpeculation(); | 52 virtual void SetSubresourceSpeculation(); |
| 53 virtual void SetOmniboxSpeculation(); | 53 virtual void SetOmniboxSpeculation(); |
| 54 virtual bool WasEverUsed() const; | 54 virtual bool WasEverUsed() const; |
| 55 virtual bool UsingTCPFastOpen() const; | 55 virtual bool UsingTCPFastOpen() const; |
| 56 virtual int64 NumBytesRead() const; | |
| 57 virtual base::TimeDelta GetConnectTimeMicros() const; | |
| 58 | 56 |
| 59 // Socket methods: | 57 // Socket methods: |
| 60 // Multiple outstanding requests are not supported. | 58 // Multiple outstanding requests are not supported. |
| 61 // Full duplex mode (reading and writing at the same time) is supported | 59 // Full duplex mode (reading and writing at the same time) is supported |
| 62 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 60 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| 63 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 61 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| 64 virtual bool SetReceiveBufferSize(int32 size); | 62 virtual bool SetReceiveBufferSize(int32 size); |
| 65 virtual bool SetSendBufferSize(int32 size); | 63 virtual bool SetSendBufferSize(int32 size); |
| 66 | 64 |
| 67 private: | 65 private: |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // Record of connectivity and transmissions, for use in speculative connection | 188 // Record of connectivity and transmissions, for use in speculative connection |
| 191 // histograms. | 189 // histograms. |
| 192 UseHistory use_history_; | 190 UseHistory use_history_; |
| 193 | 191 |
| 194 // Enables experimental TCP FastOpen option. | 192 // Enables experimental TCP FastOpen option. |
| 195 bool use_tcp_fastopen_; | 193 bool use_tcp_fastopen_; |
| 196 | 194 |
| 197 // True when TCP FastOpen is in use and we have done the connect. | 195 // True when TCP FastOpen is in use and we have done the connect. |
| 198 bool tcp_fastopen_connected_; | 196 bool tcp_fastopen_connected_; |
| 199 | 197 |
| 200 base::TimeTicks connect_start_time_; | |
| 201 base::TimeDelta connect_time_micros_; | |
| 202 int64 num_bytes_read_; | |
| 203 | |
| 204 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); | 198 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); |
| 205 }; | 199 }; |
| 206 | 200 |
| 207 } // namespace net | 201 } // namespace net |
| 208 | 202 |
| 209 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 203 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| OLD | NEW |