| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BIN_SOCKET_H_ | 5 #ifndef BIN_SOCKET_H_ |
| 6 #define BIN_SOCKET_H_ | 6 #define BIN_SOCKET_H_ |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
| 10 | 10 |
| 11 #include "platform/globals.h" | 11 #include "platform/globals.h" |
| 12 #include "platform/thread.h" | 12 #include "platform/thread.h" |
| 13 // Declare the OS-specific types ahead of defining the generic class. | 13 // Declare the OS-specific types ahead of defining the generic class. |
| 14 #if defined(TARGET_OS_LINUX) | 14 #if defined(TARGET_OS_ANDROID) |
| 15 #include "bin/socket_android.h" |
| 16 #elif defined(TARGET_OS_LINUX) |
| 15 #include "bin/socket_linux.h" | 17 #include "bin/socket_linux.h" |
| 16 #elif defined(TARGET_OS_MACOS) | 18 #elif defined(TARGET_OS_MACOS) |
| 17 #include "bin/socket_macos.h" | 19 #include "bin/socket_macos.h" |
| 18 #elif defined(TARGET_OS_WINDOWS) | 20 #elif defined(TARGET_OS_WINDOWS) |
| 19 #include "bin/socket_win.h" | 21 #include "bin/socket_win.h" |
| 20 #else | 22 #else |
| 21 #error Unknown target os. | 23 #error Unknown target os. |
| 22 #endif | 24 #endif |
| 23 | 25 |
| 24 | 26 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 static intptr_t Accept(intptr_t fd); | 64 static intptr_t Accept(intptr_t fd); |
| 63 static intptr_t CreateBindListen(const char* bindAddress, | 65 static intptr_t CreateBindListen(const char* bindAddress, |
| 64 intptr_t port, | 66 intptr_t port, |
| 65 intptr_t backlog); | 67 intptr_t backlog); |
| 66 | 68 |
| 67 DISALLOW_ALLOCATION(); | 69 DISALLOW_ALLOCATION(); |
| 68 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); | 70 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 #endif // BIN_SOCKET_H_ | 73 #endif // BIN_SOCKET_H_ |
| OLD | NEW |