| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/non_thread_safe.h" | 10 #include "base/non_thread_safe.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // the given socket and then acts as if Connect() had been called. This | 38 // the given socket and then acts as if Connect() had been called. This |
| 39 // function is intended for testing only. | 39 // function is intended for testing only. |
| 40 void AdoptSocket(int socket); | 40 void AdoptSocket(int socket); |
| 41 | 41 |
| 42 // ClientSocket methods: | 42 // ClientSocket methods: |
| 43 virtual int Connect(CompletionCallback* callback); | 43 virtual int Connect(CompletionCallback* callback); |
| 44 virtual void Disconnect(); | 44 virtual void Disconnect(); |
| 45 virtual bool IsConnected() const; | 45 virtual bool IsConnected() const; |
| 46 virtual bool IsConnectedAndIdle() const; | 46 virtual bool IsConnectedAndIdle() const; |
| 47 virtual int GetPeerAddress(AddressList* address) const; | 47 virtual int GetPeerAddress(AddressList* address) const; |
| 48 virtual const BoundNetLog& NetLog() const { return net_log_; } | 48 virtual const BoundNetLog& NetLog() const; |
| 49 virtual void SetSubresourceSpeculation(); | 49 virtual void SetSubresourceSpeculation(); |
| 50 virtual void SetOmniboxSpeculation(); | 50 virtual void SetOmniboxSpeculation(); |
| 51 virtual bool WasEverUsed() const; | 51 virtual bool WasEverUsed() const; |
| 52 virtual bool UsingTCPFastOpen() const; | 52 virtual bool UsingTCPFastOpen() const; |
| 53 | 53 |
| 54 // Socket methods: | 54 // Socket methods: |
| 55 // Multiple outstanding requests are not supported. | 55 // Multiple outstanding requests are not supported. |
| 56 // Full duplex mode (reading and writing at the same time) is supported | 56 // Full duplex mode (reading and writing at the same time) is supported |
| 57 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 57 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| 58 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 58 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 // True when TCP FastOpen is in use and we have done the connect. | 191 // True when TCP FastOpen is in use and we have done the connect. |
| 192 bool tcp_fastopen_connected_; | 192 bool tcp_fastopen_connected_; |
| 193 | 193 |
| 194 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); | 194 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 } // namespace net | 197 } // namespace net |
| 198 | 198 |
| 199 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 199 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| OLD | NEW |