OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_SOCKS_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // Does the SOCKS handshake and completes the protocol. | 40 // Does the SOCKS handshake and completes the protocol. |
41 virtual int Connect(CompletionCallback* callback); | 41 virtual int Connect(CompletionCallback* callback); |
42 virtual void Disconnect(); | 42 virtual void Disconnect(); |
43 virtual bool IsConnected() const; | 43 virtual bool IsConnected() const; |
44 virtual bool IsConnectedAndIdle() const; | 44 virtual bool IsConnectedAndIdle() const; |
45 | 45 |
46 // Socket methods: | 46 // Socket methods: |
47 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 47 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
48 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); | 48 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
49 | 49 |
| 50 virtual bool SetReceiveBufferSize(int32 size); |
| 51 virtual bool SetSendBufferSize(int32 size); |
| 52 |
50 #if defined(OS_LINUX) | 53 #if defined(OS_LINUX) |
51 // Needed by ssl_client_socket_nss. | 54 // Needed by ssl_client_socket_nss. |
52 virtual int GetPeerName(struct sockaddr* name, socklen_t* namelen); | 55 virtual int GetPeerName(struct sockaddr* name, socklen_t* namelen); |
53 #endif | 56 #endif |
54 | 57 |
55 private: | 58 private: |
56 FRIEND_TEST(SOCKSClientSocketTest, CompleteHandshake); | 59 FRIEND_TEST(SOCKSClientSocketTest, CompleteHandshake); |
57 FRIEND_TEST(SOCKSClientSocketTest, SOCKS4AFailedDNS); | 60 FRIEND_TEST(SOCKSClientSocketTest, SOCKS4AFailedDNS); |
58 FRIEND_TEST(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6); | 61 FRIEND_TEST(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6); |
59 | 62 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 AddressList addresses_; | 126 AddressList addresses_; |
124 HostResolver::RequestInfo host_request_info_; | 127 HostResolver::RequestInfo host_request_info_; |
125 | 128 |
126 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket); | 129 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket); |
127 }; | 130 }; |
128 | 131 |
129 } // namespace net | 132 } // namespace net |
130 | 133 |
131 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ | 134 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
132 | 135 |
OLD | NEW |