| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes); | 36 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes); |
| 37 static intptr_t CreateConnect(const char* host, const intptr_t port); | 37 static intptr_t CreateConnect(const char* host, const intptr_t port); |
| 38 static intptr_t GetPort(intptr_t fd); | 38 static intptr_t GetPort(intptr_t fd); |
| 39 static bool GetRemotePeer(intptr_t fd, char* host, intptr_t* port); | 39 static bool GetRemotePeer(intptr_t fd, char* host, intptr_t* port); |
| 40 static void GetError(intptr_t fd, OSError* os_error); | 40 static void GetError(intptr_t fd, OSError* os_error); |
| 41 static int GetType(intptr_t fd); | 41 static int GetType(intptr_t fd); |
| 42 static intptr_t GetStdioHandle(int num); | 42 static intptr_t GetStdioHandle(int num); |
| 43 static void Close(intptr_t fd); | 43 static void Close(intptr_t fd); |
| 44 static bool SetNonBlocking(intptr_t fd); | 44 static bool SetNonBlocking(intptr_t fd); |
| 45 static bool SetBlocking(intptr_t fd); | 45 static bool SetBlocking(intptr_t fd); |
| 46 static bool SetNoDelay(intptr_t fd, bool enabled); |
| 46 | 47 |
| 47 // Perform a IPv4 hostname lookup. Returns the hostname string in | 48 // Perform a IPv4 hostname lookup. Returns the hostname string in |
| 48 // IPv4 dotted-decimal format. | 49 // IPv4 dotted-decimal format. |
| 49 static const char* LookupIPv4Address(char* host, OSError** os_error); | 50 static const char* LookupIPv4Address(char* host, OSError** os_error); |
| 50 | 51 |
| 51 static Dart_Port GetServicePort(); | 52 static Dart_Port GetServicePort(); |
| 52 | 53 |
| 53 static Dart_Handle SetSocketIdNativeField(Dart_Handle socket, intptr_t id); | 54 static Dart_Handle SetSocketIdNativeField(Dart_Handle socket, intptr_t id); |
| 54 static Dart_Handle GetSocketIdNativeField(Dart_Handle socket, intptr_t* id); | 55 static Dart_Handle GetSocketIdNativeField(Dart_Handle socket, intptr_t* id); |
| 55 | 56 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 77 // -5: invalid bindAddress | 78 // -5: invalid bindAddress |
| 78 static intptr_t CreateBindListen(const char* bindAddress, | 79 static intptr_t CreateBindListen(const char* bindAddress, |
| 79 intptr_t port, | 80 intptr_t port, |
| 80 intptr_t backlog); | 81 intptr_t backlog); |
| 81 | 82 |
| 82 DISALLOW_ALLOCATION(); | 83 DISALLOW_ALLOCATION(); |
| 83 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); | 84 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 #endif // BIN_SOCKET_H_ | 87 #endif // BIN_SOCKET_H_ |
| OLD | NEW |