| 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_BASE_SOCKET_H__ | 11 #ifndef WEBRTC_BASE_SOCKET_H__ |
| 12 #define WEBRTC_BASE_SOCKET_H__ | 12 #define WEBRTC_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/base/win32.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 #include "webrtc/base/basictypes.h" | 28 #include "webrtc/base/basictypes.h" |
| 29 #include "webrtc/base/constructormagic.h" |
| 29 #include "webrtc/base/socketaddress.h" | 30 #include "webrtc/base/socketaddress.h" |
| 30 | 31 |
| 31 // Rather than converting errors into a private namespace, | 32 // Rather than converting errors into a private namespace, |
| 32 // Reuse the POSIX socket api errors. Note this depends on | 33 // Reuse the POSIX socket api errors. Note this depends on |
| 33 // Win32 compatibility. | 34 // Win32 compatibility. |
| 34 | 35 |
| 35 #if defined(WEBRTC_WIN) | 36 #if defined(WEBRTC_WIN) |
| 36 #undef EWOULDBLOCK // Remove errno.h's definition for each macro below. | 37 #undef EWOULDBLOCK // Remove errno.h's definition for each macro below. |
| 37 #define EWOULDBLOCK WSAEWOULDBLOCK | 38 #define EWOULDBLOCK WSAEWOULDBLOCK |
| 38 #undef EINPROGRESS | 39 #undef EINPROGRESS |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 protected: | 180 protected: |
| 180 Socket() {} | 181 Socket() {} |
| 181 | 182 |
| 182 private: | 183 private: |
| 183 RTC_DISALLOW_COPY_AND_ASSIGN(Socket); | 184 RTC_DISALLOW_COPY_AND_ASSIGN(Socket); |
| 184 }; | 185 }; |
| 185 | 186 |
| 186 } // namespace rtc | 187 } // namespace rtc |
| 187 | 188 |
| 188 #endif // WEBRTC_BASE_SOCKET_H__ | 189 #endif // WEBRTC_BASE_SOCKET_H__ |
| OLD | NEW |