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 #if defined(DART_IO_DISABLED) | 8 #if defined(DART_IO_DISABLED) |
9 #error "socket.h can only be included on builds with IO enabled" | 9 #error "socket.h can only be included on builds with IO enabled" |
10 #endif | 10 #endif |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 OSError** os_error); | 308 OSError** os_error); |
309 | 309 |
310 static bool ReverseLookup(const RawAddr& addr, | 310 static bool ReverseLookup(const RawAddr& addr, |
311 char* host, | 311 char* host, |
312 intptr_t host_len, | 312 intptr_t host_len, |
313 OSError** os_error); | 313 OSError** os_error); |
314 | 314 |
315 static bool ParseAddress(int type, const char* address, RawAddr* addr); | 315 static bool ParseAddress(int type, const char* address, RawAddr* addr); |
316 static bool FormatNumericAddress(const RawAddr& addr, char* address, int len); | 316 static bool FormatNumericAddress(const RawAddr& addr, char* address, int len); |
317 | 317 |
| 318 // Whether ListInterfaces is supported. |
| 319 static bool ListInterfacesSupported(); |
| 320 |
318 // List interfaces. Returns a AddressList of InterfaceSocketAddress's. | 321 // List interfaces. Returns a AddressList of InterfaceSocketAddress's. |
319 static AddressList<InterfaceSocketAddress>* ListInterfaces( | 322 static AddressList<InterfaceSocketAddress>* ListInterfaces( |
320 int type, | 323 int type, |
321 OSError** os_error); | 324 OSError** os_error); |
322 | 325 |
323 static CObject* LookupRequest(const CObjectArray& request); | 326 static CObject* LookupRequest(const CObjectArray& request); |
324 static CObject* ListInterfacesRequest(const CObjectArray& request); | 327 static CObject* ListInterfacesRequest(const CObjectArray& request); |
325 static CObject* ReverseLookupRequest(const CObjectArray& request); | 328 static CObject* ReverseLookupRequest(const CObjectArray& request); |
326 | 329 |
327 static Dart_Port GetServicePort(); | 330 static Dart_Port GetServicePort(); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 typedef std::map<intptr_t, OSSocket*>::iterator SocketsIterator; | 439 typedef std::map<intptr_t, OSSocket*>::iterator SocketsIterator; |
437 | 440 |
438 private: | 441 private: |
439 DISALLOW_COPY_AND_ASSIGN(ListeningSocketRegistry); | 442 DISALLOW_COPY_AND_ASSIGN(ListeningSocketRegistry); |
440 }; | 443 }; |
441 | 444 |
442 } // namespace bin | 445 } // namespace bin |
443 } // namespace dart | 446 } // namespace dart |
444 | 447 |
445 #endif // BIN_SOCKET_H_ | 448 #endif // BIN_SOCKET_H_ |
OLD | NEW |