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 |
11 #if defined(_MSC_VER) && _MSC_VER < 1300 | 11 #if defined(_MSC_VER) && _MSC_VER < 1300 |
12 #pragma warning(disable:4786) | 12 #pragma warning(disable:4786) |
13 #endif | 13 #endif |
14 | 14 |
15 #include <time.h> | 15 #include <time.h> |
16 #include <errno.h> | 16 #include <errno.h> |
17 | 17 |
18 #if defined(WEBRTC_WIN) | 18 #if defined(WEBRTC_WIN) |
19 #define WIN32_LEAN_AND_MEAN | 19 #define WIN32_LEAN_AND_MEAN |
20 #include <windows.h> | 20 #include <windows.h> |
21 #include <winsock2.h> | 21 #include <winsock2.h> |
22 #include <ws2tcpip.h> | 22 #include <ws2tcpip.h> |
23 #define SECURITY_WIN32 | 23 #define SECURITY_WIN32 |
24 #include <security.h> | 24 #include <security.h> |
25 #endif | 25 #endif |
26 | 26 |
27 #include <algorithm> | 27 #include <algorithm> |
28 | 28 |
29 #include "webrtc/base/bytebuffer.h" | 29 #include "webrtc/rtc_base/bytebuffer.h" |
30 #include "webrtc/base/checks.h" | 30 #include "webrtc/rtc_base/checks.h" |
31 #include "webrtc/base/httpcommon.h" | 31 #include "webrtc/rtc_base/httpcommon.h" |
32 #include "webrtc/base/logging.h" | 32 #include "webrtc/rtc_base/logging.h" |
33 #include "webrtc/base/socketadapters.h" | 33 #include "webrtc/rtc_base/socketadapters.h" |
34 #include "webrtc/base/stringencode.h" | 34 #include "webrtc/rtc_base/stringencode.h" |
35 #include "webrtc/base/stringutils.h" | 35 #include "webrtc/rtc_base/stringutils.h" |
36 | 36 |
37 namespace rtc { | 37 namespace rtc { |
38 | 38 |
39 BufferedReadAdapter::BufferedReadAdapter(AsyncSocket* socket, size_t size) | 39 BufferedReadAdapter::BufferedReadAdapter(AsyncSocket* socket, size_t size) |
40 : AsyncSocketAdapter(socket), buffer_size_(size), | 40 : AsyncSocketAdapter(socket), buffer_size_(size), |
41 data_len_(0), buffering_(false) { | 41 data_len_(0), buffering_(false) { |
42 buffer_ = new char[buffer_size_]; | 42 buffer_ = new char[buffer_size_]; |
43 } | 43 } |
44 | 44 |
45 BufferedReadAdapter::~BufferedReadAdapter() { | 45 BufferedReadAdapter::~BufferedReadAdapter() { |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 | 839 |
840 void AsyncSocksProxyServerSocket::Error(int error) { | 840 void AsyncSocksProxyServerSocket::Error(int error) { |
841 state_ = SS_ERROR; | 841 state_ = SS_ERROR; |
842 BufferInput(false); | 842 BufferInput(false); |
843 Close(); | 843 Close(); |
844 SetError(SOCKET_EACCES); | 844 SetError(SOCKET_EACCES); |
845 SignalCloseEvent(this, error); | 845 SignalCloseEvent(this, error); |
846 } | 846 } |
847 | 847 |
848 } // namespace rtc | 848 } // namespace rtc |
OLD | NEW |