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 #ifndef WEBRTC_RTC_BASE_SOCKET_H_ | 11 #ifndef WEBRTC_RTC_BASE_SOCKET_H_ |
12 #define WEBRTC_RTC_BASE_SOCKET_H_ | 12 #define WEBRTC_RTC_BASE_SOCKET_H_ |
13 | 13 |
14 #include <errno.h> | 14 #include <errno.h> |
15 | 15 |
16 #if defined(WEBRTC_POSIX) | 16 #if defined(WEBRTC_POSIX) |
17 #include <sys/types.h> | 17 #include <sys/types.h> |
18 #include <sys/socket.h> | 18 #include <sys/socket.h> |
19 #include <arpa/inet.h> | 19 #include <arpa/inet.h> |
20 #include <netinet/in.h> | 20 #include <netinet/in.h> |
21 #define SOCKET_EACCES EACCES | 21 #define SOCKET_EACCES EACCES |
22 #endif | 22 #endif |
23 | 23 |
24 #if defined(WEBRTC_WIN) | 24 #if defined(WEBRTC_WIN) |
25 #include "webrtc/base/win32.h" | 25 #include "webrtc/rtc_base/win32.h" |
26 #endif | 26 #endif |
27 | 27 |
28 #include "webrtc/base/basictypes.h" | 28 #include "webrtc/rtc_base/basictypes.h" |
29 #include "webrtc/base/constructormagic.h" | 29 #include "webrtc/rtc_base/constructormagic.h" |
30 #include "webrtc/base/socketaddress.h" | 30 #include "webrtc/rtc_base/socketaddress.h" |
31 | 31 |
32 // Rather than converting errors into a private namespace, | 32 // Rather than converting errors into a private namespace, |
33 // Reuse the POSIX socket api errors. Note this depends on | 33 // Reuse the POSIX socket api errors. Note this depends on |
34 // Win32 compatibility. | 34 // Win32 compatibility. |
35 | 35 |
36 #if defined(WEBRTC_WIN) | 36 #if defined(WEBRTC_WIN) |
37 #undef EWOULDBLOCK // Remove errno.h's definition for each macro below. | 37 #undef EWOULDBLOCK // Remove errno.h's definition for each macro below. |
38 #define EWOULDBLOCK WSAEWOULDBLOCK | 38 #define EWOULDBLOCK WSAEWOULDBLOCK |
39 #undef EINPROGRESS | 39 #undef EINPROGRESS |
40 #define EINPROGRESS WSAEINPROGRESS | 40 #define EINPROGRESS WSAEINPROGRESS |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 protected: | 188 protected: |
189 Socket() {} | 189 Socket() {} |
190 | 190 |
191 private: | 191 private: |
192 RTC_DISALLOW_COPY_AND_ASSIGN(Socket); | 192 RTC_DISALLOW_COPY_AND_ASSIGN(Socket); |
193 }; | 193 }; |
194 | 194 |
195 } // namespace rtc | 195 } // namespace rtc |
196 | 196 |
197 #endif // WEBRTC_RTC_BASE_SOCKET_H_ | 197 #endif // WEBRTC_RTC_BASE_SOCKET_H_ |
OLD | NEW |