| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 class Socket { | 123 class Socket { |
| 124 public: | 124 public: |
| 125 enum SocketRequest { | 125 enum SocketRequest { |
| 126 kLookupRequest = 0, | 126 kLookupRequest = 0, |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 static bool Initialize(); | 129 static bool Initialize(); |
| 130 static intptr_t Available(intptr_t fd); | 130 static intptr_t Available(intptr_t fd); |
| 131 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes); | 131 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes); |
| 132 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes); | 132 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes); |
| 133 static intptr_t Create(RawAddr addr); |
| 134 static intptr_t Connect(intptr_t fd, RawAddr addr, const intptr_t port); |
| 133 static intptr_t CreateConnect(RawAddr addr, | 135 static intptr_t CreateConnect(RawAddr addr, |
| 134 const intptr_t port); | 136 const intptr_t port); |
| 135 static intptr_t GetPort(intptr_t fd); | 137 static intptr_t GetPort(intptr_t fd); |
| 136 static bool GetRemotePeer(intptr_t fd, char* host, intptr_t* port); | 138 static bool GetRemotePeer(intptr_t fd, char* host, intptr_t* port); |
| 137 static void GetError(intptr_t fd, OSError* os_error); | 139 static void GetError(intptr_t fd, OSError* os_error); |
| 138 static int GetType(intptr_t fd); | 140 static int GetType(intptr_t fd); |
| 139 static intptr_t GetStdioHandle(int num); | 141 static intptr_t GetStdioHandle(int num); |
| 140 static void Close(intptr_t fd); | 142 static void Close(intptr_t fd); |
| 141 static bool SetNonBlocking(intptr_t fd); | 143 static bool SetNonBlocking(intptr_t fd); |
| 142 static bool SetBlocking(intptr_t fd); | 144 static bool SetBlocking(intptr_t fd); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 bool v6_only = false); | 182 bool v6_only = false); |
| 181 | 183 |
| 182 DISALLOW_ALLOCATION(); | 184 DISALLOW_ALLOCATION(); |
| 183 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); | 185 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); |
| 184 }; | 186 }; |
| 185 | 187 |
| 186 } // namespace bin | 188 } // namespace bin |
| 187 } // namespace dart | 189 } // namespace dart |
| 188 | 190 |
| 189 #endif // BIN_SOCKET_H_ | 191 #endif // BIN_SOCKET_H_ |
| OLD | NEW |