Chromium Code Reviews| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 | 44 |
| 45 // Perform a IPv4 hostname lookup. Returns the hostname string in | 45 // Perform a IPv4 hostname lookup. Returns the hostname string in |
| 46 // IPv4 dotted-decimal format. | 46 // IPv4 dotted-decimal format. |
| 47 static const char* LookupIPv4Address(char* host, OSError** os_error); | 47 static const char* LookupIPv4Address(char* host, OSError** os_error); |
| 48 | 48 |
| 49 static Dart_Port GetServicePort(); | 49 static Dart_Port GetServicePort(); |
| 50 | 50 |
| 51 static Dart_Handle SetSocketIdNativeField(Dart_Handle socket, intptr_t id); | 51 static Dart_Handle SetSocketIdNativeField(Dart_Handle socket, intptr_t id); |
| 52 static Dart_Handle GetSocketIdNativeField(Dart_Handle socket, intptr_t* id); | 52 static Dart_Handle GetSocketIdNativeField(Dart_Handle socket, intptr_t* id); |
| 53 | 53 |
| 54 static bool SetNonBlocking(intptr_t fd); | |
| 55 static bool SetBlocking(intptr_t fd); | |
|
siva
2013/03/01 01:24:56
Why not club these with all the socket operation m
Tom Ball
2013/03/01 18:33:04
Done.
| |
| 56 | |
| 54 private: | 57 private: |
| 55 static dart::Mutex mutex_; | 58 static dart::Mutex mutex_; |
| 56 static int service_ports_size_; | 59 static int service_ports_size_; |
| 57 static Dart_Port* service_ports_; | 60 static Dart_Port* service_ports_; |
| 58 static int service_ports_index_; | 61 static int service_ports_index_; |
| 59 | 62 |
| 60 DISALLOW_ALLOCATION(); | 63 DISALLOW_ALLOCATION(); |
| 61 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket); | 64 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket); |
| 62 }; | 65 }; |
| 63 | 66 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 75 // -5: invalid bindAddress | 78 // -5: invalid bindAddress |
| 76 static intptr_t CreateBindListen(const char* bindAddress, | 79 static intptr_t CreateBindListen(const char* bindAddress, |
| 77 intptr_t port, | 80 intptr_t port, |
| 78 intptr_t backlog); | 81 intptr_t backlog); |
| 79 | 82 |
| 80 DISALLOW_ALLOCATION(); | 83 DISALLOW_ALLOCATION(); |
| 81 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); | 84 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 #endif // BIN_SOCKET_H_ | 87 #endif // BIN_SOCKET_H_ |
| OLD | NEW |