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_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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // proxy side. | 36 // proxy side. |
37 SOCKS5ClientSocket(scoped_ptr<ClientSocketHandle> transport_socket, | 37 SOCKS5ClientSocket(scoped_ptr<ClientSocketHandle> transport_socket, |
38 const HostResolver::RequestInfo& req_info); | 38 const HostResolver::RequestInfo& req_info); |
39 | 39 |
40 // On destruction Disconnect() is called. | 40 // On destruction Disconnect() is called. |
41 virtual ~SOCKS5ClientSocket(); | 41 virtual ~SOCKS5ClientSocket(); |
42 | 42 |
43 // StreamSocket implementation. | 43 // StreamSocket implementation. |
44 | 44 |
45 // Does the SOCKS handshake and completes the protocol. | 45 // Does the SOCKS handshake and completes the protocol. |
46 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 46 virtual int Connect(const CompletionCallback& callback) override; |
47 virtual void Disconnect() OVERRIDE; | 47 virtual void Disconnect() override; |
48 virtual bool IsConnected() const OVERRIDE; | 48 virtual bool IsConnected() const override; |
49 virtual bool IsConnectedAndIdle() const OVERRIDE; | 49 virtual bool IsConnectedAndIdle() const override; |
50 virtual const BoundNetLog& NetLog() const OVERRIDE; | 50 virtual const BoundNetLog& NetLog() const override; |
51 virtual void SetSubresourceSpeculation() OVERRIDE; | 51 virtual void SetSubresourceSpeculation() override; |
52 virtual void SetOmniboxSpeculation() OVERRIDE; | 52 virtual void SetOmniboxSpeculation() override; |
53 virtual bool WasEverUsed() const OVERRIDE; | 53 virtual bool WasEverUsed() const override; |
54 virtual bool UsingTCPFastOpen() const OVERRIDE; | 54 virtual bool UsingTCPFastOpen() const override; |
55 virtual bool WasNpnNegotiated() const OVERRIDE; | 55 virtual bool WasNpnNegotiated() const override; |
56 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; | 56 virtual NextProto GetNegotiatedProtocol() const override; |
57 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | 57 virtual bool GetSSLInfo(SSLInfo* ssl_info) override; |
58 | 58 |
59 // Socket implementation. | 59 // Socket implementation. |
60 virtual int Read(IOBuffer* buf, | 60 virtual int Read(IOBuffer* buf, |
61 int buf_len, | 61 int buf_len, |
62 const CompletionCallback& callback) OVERRIDE; | 62 const CompletionCallback& callback) override; |
63 virtual int Write(IOBuffer* buf, | 63 virtual int Write(IOBuffer* buf, |
64 int buf_len, | 64 int buf_len, |
65 const CompletionCallback& callback) OVERRIDE; | 65 const CompletionCallback& callback) override; |
66 | 66 |
67 virtual int SetReceiveBufferSize(int32 size) OVERRIDE; | 67 virtual int SetReceiveBufferSize(int32 size) override; |
68 virtual int SetSendBufferSize(int32 size) OVERRIDE; | 68 virtual int SetSendBufferSize(int32 size) override; |
69 | 69 |
70 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; | 70 virtual int GetPeerAddress(IPEndPoint* address) const override; |
71 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 71 virtual int GetLocalAddress(IPEndPoint* address) const override; |
72 | 72 |
73 private: | 73 private: |
74 enum State { | 74 enum State { |
75 STATE_GREET_WRITE, | 75 STATE_GREET_WRITE, |
76 STATE_GREET_WRITE_COMPLETE, | 76 STATE_GREET_WRITE_COMPLETE, |
77 STATE_GREET_READ, | 77 STATE_GREET_READ, |
78 STATE_GREET_READ_COMPLETE, | 78 STATE_GREET_READ_COMPLETE, |
79 STATE_HANDSHAKE_WRITE, | 79 STATE_HANDSHAKE_WRITE, |
80 STATE_HANDSHAKE_WRITE_COMPLETE, | 80 STATE_HANDSHAKE_WRITE_COMPLETE, |
81 STATE_HANDSHAKE_READ, | 81 STATE_HANDSHAKE_READ, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 HostResolver::RequestInfo host_request_info_; | 149 HostResolver::RequestInfo host_request_info_; |
150 | 150 |
151 BoundNetLog net_log_; | 151 BoundNetLog net_log_; |
152 | 152 |
153 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); | 153 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); |
154 }; | 154 }; |
155 | 155 |
156 } // namespace net | 156 } // namespace net |
157 | 157 |
158 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ | 158 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
OLD | NEW |