OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 // Implements a proxy server socket for the SOCKS protocol. | 189 // Implements a proxy server socket for the SOCKS protocol. |
190 class AsyncSocksProxyServerSocket : public AsyncProxyServerSocket { | 190 class AsyncSocksProxyServerSocket : public AsyncProxyServerSocket { |
191 public: | 191 public: |
192 explicit AsyncSocksProxyServerSocket(AsyncSocket* socket); | 192 explicit AsyncSocksProxyServerSocket(AsyncSocket* socket); |
193 | 193 |
194 private: | 194 private: |
195 void ProcessInput(char* data, size_t* len) override; | 195 void ProcessInput(char* data, size_t* len) override; |
196 void DirectSend(const ByteBuffer& buf); | 196 void DirectSend(const ByteBuffer& buf); |
197 | 197 |
198 void HandleHello(ByteBuffer* request); | 198 void HandleHello(ByteBuffer* request); |
199 void SendHelloReply(uint8 method); | 199 void SendHelloReply(uint8_t method); |
200 void HandleAuth(ByteBuffer* request); | 200 void HandleAuth(ByteBuffer* request); |
201 void SendAuthReply(uint8 result); | 201 void SendAuthReply(uint8_t result); |
202 void HandleConnect(ByteBuffer* request); | 202 void HandleConnect(ByteBuffer* request); |
203 void SendConnectResult(int result, const SocketAddress& addr) override; | 203 void SendConnectResult(int result, const SocketAddress& addr) override; |
204 | 204 |
205 void Error(int error); | 205 void Error(int error); |
206 | 206 |
207 static const int kBufferSize = 1024; | 207 static const int kBufferSize = 1024; |
208 enum State { | 208 enum State { |
209 SS_HELLO, SS_AUTH, SS_CONNECT, SS_CONNECT_PENDING, SS_TUNNEL, SS_ERROR | 209 SS_HELLO, SS_AUTH, SS_CONNECT, SS_CONNECT_PENDING, SS_TUNNEL, SS_ERROR |
210 }; | 210 }; |
211 State state_; | 211 State state_; |
(...skipping 24 matching lines...) Expand all Loading... |
236 bool hex_mode_; | 236 bool hex_mode_; |
237 LogMultilineState lms_; | 237 LogMultilineState lms_; |
238 RTC_DISALLOW_COPY_AND_ASSIGN(LoggingSocketAdapter); | 238 RTC_DISALLOW_COPY_AND_ASSIGN(LoggingSocketAdapter); |
239 }; | 239 }; |
240 | 240 |
241 /////////////////////////////////////////////////////////////////////////////// | 241 /////////////////////////////////////////////////////////////////////////////// |
242 | 242 |
243 } // namespace rtc | 243 } // namespace rtc |
244 | 244 |
245 #endif // WEBRTC_BASE_SOCKETADAPTERS_H_ | 245 #endif // WEBRTC_BASE_SOCKETADAPTERS_H_ |
OLD | NEW |