| 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 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 DISALLOW_ALLOCATION(); | 55 DISALLOW_ALLOCATION(); |
| 56 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket); | 56 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 | 59 |
| 60 class ServerSocket { | 60 class ServerSocket { |
| 61 public: | 61 public: |
| 62 static const intptr_t kTemporaryFailure = -2; | 62 static const intptr_t kTemporaryFailure = -2; |
| 63 | 63 |
| 64 static intptr_t Accept(intptr_t fd); | 64 static intptr_t Accept(intptr_t fd); |
| 65 |
| 66 // Returns a positive integer if the call is successful. In case of failure |
| 67 // it returns: |
| 68 // |
| 69 // -1: system error (errno set) |
| 70 // -5: invalid bindAddress |
| 65 static intptr_t CreateBindListen(const char* bindAddress, | 71 static intptr_t CreateBindListen(const char* bindAddress, |
| 66 intptr_t port, | 72 intptr_t port, |
| 67 intptr_t backlog); | 73 intptr_t backlog); |
| 68 | 74 |
| 69 DISALLOW_ALLOCATION(); | 75 DISALLOW_ALLOCATION(); |
| 70 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); | 76 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); |
| 71 }; | 77 }; |
| 72 | 78 |
| 73 #endif // BIN_SOCKET_H_ | 79 #endif // BIN_SOCKET_H_ |
| OLD | NEW |