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_SOCKS5_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
6 #define NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Does the SOCKS handshake and completes the protocol. | 53 // Does the SOCKS handshake and completes the protocol. |
54 virtual int Connect(CompletionCallback* callback); | 54 virtual int Connect(CompletionCallback* callback); |
55 virtual void Disconnect(); | 55 virtual void Disconnect(); |
56 virtual bool IsConnected() const; | 56 virtual bool IsConnected() const; |
57 virtual bool IsConnectedAndIdle() const; | 57 virtual bool IsConnectedAndIdle() const; |
58 virtual const BoundNetLog& NetLog() const; | 58 virtual const BoundNetLog& NetLog() const; |
59 virtual void SetSubresourceSpeculation(); | 59 virtual void SetSubresourceSpeculation(); |
60 virtual void SetOmniboxSpeculation(); | 60 virtual void SetOmniboxSpeculation(); |
61 virtual bool WasEverUsed() const; | 61 virtual bool WasEverUsed() const; |
62 virtual bool UsingTCPFastOpen() const; | 62 virtual bool UsingTCPFastOpen() const; |
| 63 virtual int64 NumBytesRead() const; |
| 64 virtual int GetConnectTimeMicros() const; |
| 65 |
63 | 66 |
64 // Socket methods: | 67 // Socket methods: |
65 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 68 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
66 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 69 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
67 | 70 |
68 virtual bool SetReceiveBufferSize(int32 size); | 71 virtual bool SetReceiveBufferSize(int32 size); |
69 virtual bool SetSendBufferSize(int32 size); | 72 virtual bool SetSendBufferSize(int32 size); |
70 | 73 |
71 virtual int GetPeerAddress(AddressList* address) const; | 74 virtual int GetPeerAddress(AddressList* address) const; |
72 virtual int GetLocalAddress(IPEndPoint* address) const; | 75 virtual int GetLocalAddress(IPEndPoint* address) const; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 HostResolver::RequestInfo host_request_info_; | 150 HostResolver::RequestInfo host_request_info_; |
148 | 151 |
149 BoundNetLog net_log_; | 152 BoundNetLog net_log_; |
150 | 153 |
151 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); | 154 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); |
152 }; | 155 }; |
153 | 156 |
154 } // namespace net | 157 } // namespace net |
155 | 158 |
156 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ | 159 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
OLD | NEW |