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 #include "platform/globals.h" | 10 #include "platform/globals.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 static Dart_Port* service_ports_; | 38 static Dart_Port* service_ports_; |
39 static int service_ports_index_; | 39 static int service_ports_index_; |
40 | 40 |
41 DISALLOW_ALLOCATION(); | 41 DISALLOW_ALLOCATION(); |
42 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket); | 42 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket); |
43 }; | 43 }; |
44 | 44 |
45 | 45 |
46 class ServerSocket { | 46 class ServerSocket { |
47 public: | 47 public: |
| 48 static const intptr_t kTemporaryFailure = -2; |
| 49 |
48 static intptr_t Accept(intptr_t fd); | 50 static intptr_t Accept(intptr_t fd); |
49 static intptr_t CreateBindListen(const char* bindAddress, | 51 static intptr_t CreateBindListen(const char* bindAddress, |
50 intptr_t port, | 52 intptr_t port, |
51 intptr_t backlog); | 53 intptr_t backlog); |
52 | 54 |
53 DISALLOW_ALLOCATION(); | 55 DISALLOW_ALLOCATION(); |
54 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); | 56 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); |
55 }; | 57 }; |
56 | 58 |
57 #endif // BIN_SOCKET_H_ | 59 #endif // BIN_SOCKET_H_ |
OLD | NEW |