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 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 static bool Initialize(); | 157 static bool Initialize(); |
158 static intptr_t Available(intptr_t fd); | 158 static intptr_t Available(intptr_t fd); |
159 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes); | 159 static int Read(intptr_t fd, void* buffer, intptr_t num_bytes); |
160 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes); | 160 static int Write(intptr_t fd, const void* buffer, intptr_t num_bytes); |
161 static intptr_t Create(RawAddr addr); | 161 static intptr_t Create(RawAddr addr); |
162 static intptr_t Connect(intptr_t fd, RawAddr addr, const intptr_t port); | 162 static intptr_t Connect(intptr_t fd, RawAddr addr, const intptr_t port); |
163 static intptr_t CreateConnect(RawAddr addr, | 163 static intptr_t CreateConnect(RawAddr addr, |
164 const intptr_t port); | 164 const intptr_t port); |
165 static intptr_t GetPort(intptr_t fd); | 165 static intptr_t GetPort(intptr_t fd); |
166 static bool GetRemotePeer(intptr_t fd, char* host, intptr_t* port); | 166 static SocketAddress* GetRemotePeer(intptr_t fd, intptr_t* port); |
167 static void GetError(intptr_t fd, OSError* os_error); | 167 static void GetError(intptr_t fd, OSError* os_error); |
168 static int GetType(intptr_t fd); | 168 static int GetType(intptr_t fd); |
169 static intptr_t GetStdioHandle(intptr_t num); | 169 static intptr_t GetStdioHandle(intptr_t num); |
170 static void Close(intptr_t fd); | 170 static void Close(intptr_t fd); |
171 static bool SetNonBlocking(intptr_t fd); | 171 static bool SetNonBlocking(intptr_t fd); |
172 static bool SetBlocking(intptr_t fd); | 172 static bool SetBlocking(intptr_t fd); |
173 static bool SetNoDelay(intptr_t fd, bool enabled); | 173 static bool SetNoDelay(intptr_t fd, bool enabled); |
174 | 174 |
175 // Perform a hostname lookup. Returns a AddressList of SocketAddress's. | 175 // Perform a hostname lookup. Returns a AddressList of SocketAddress's. |
176 static AddressList<SocketAddress>* LookupAddress(const char* host, | 176 static AddressList<SocketAddress>* LookupAddress(const char* host, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 private: | 225 private: |
226 DISALLOW_ALLOCATION(); | 226 DISALLOW_ALLOCATION(); |
227 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); | 227 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); |
228 }; | 228 }; |
229 | 229 |
230 } // namespace bin | 230 } // namespace bin |
231 } // namespace dart | 231 } // namespace dart |
232 | 232 |
233 #endif // BIN_SOCKET_H_ | 233 #endif // BIN_SOCKET_H_ |
OLD | NEW |