| 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 #if !defined(DART_IO_DISABLED) | 5 #if !defined(DART_IO_DISABLED) |
| 6 | 6 |
| 7 #include "platform/globals.h" | 7 #include "platform/globals.h" |
| 8 #if defined(TARGET_OS_WINDOWS) | 8 #if defined(TARGET_OS_WINDOWS) |
| 9 | 9 |
| 10 #include "bin/socket.h" | 10 #include "bin/socket.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 SetLastError(rc); | 404 SetLastError(rc); |
| 405 return -1; | 405 return -1; |
| 406 } | 406 } |
| 407 | 407 |
| 408 DatagramSocket* datagram_socket = new DatagramSocket(s); | 408 DatagramSocket* datagram_socket = new DatagramSocket(s); |
| 409 datagram_socket->EnsureInitialized(EventHandler::delegate()); | 409 datagram_socket->EnsureInitialized(EventHandler::delegate()); |
| 410 return reinterpret_cast<intptr_t>(datagram_socket); | 410 return reinterpret_cast<intptr_t>(datagram_socket); |
| 411 } | 411 } |
| 412 | 412 |
| 413 | 413 |
| 414 bool Socket::ListInterfacesSupported() { |
| 415 return true; |
| 416 } |
| 417 |
| 418 |
| 414 AddressList<InterfaceSocketAddress>* Socket::ListInterfaces( | 419 AddressList<InterfaceSocketAddress>* Socket::ListInterfaces( |
| 415 int type, | 420 int type, |
| 416 OSError** os_error) { | 421 OSError** os_error) { |
| 417 Initialize(); | 422 Initialize(); |
| 418 | 423 |
| 419 ULONG size = 0; | 424 ULONG size = 0; |
| 420 DWORD flags = GAA_FLAG_SKIP_ANYCAST | | 425 DWORD flags = GAA_FLAG_SKIP_ANYCAST | |
| 421 GAA_FLAG_SKIP_MULTICAST | | 426 GAA_FLAG_SKIP_MULTICAST | |
| 422 GAA_FLAG_SKIP_DNS_SERVER; | 427 GAA_FLAG_SKIP_DNS_SERVER; |
| 423 // Query the size needed. | 428 // Query the size needed. |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 reinterpret_cast<char *>(&mreq), | 714 reinterpret_cast<char *>(&mreq), |
| 710 sizeof(mreq)) == 0; | 715 sizeof(mreq)) == 0; |
| 711 } | 716 } |
| 712 | 717 |
| 713 } // namespace bin | 718 } // namespace bin |
| 714 } // namespace dart | 719 } // namespace dart |
| 715 | 720 |
| 716 #endif // defined(TARGET_OS_WINDOWS) | 721 #endif // defined(TARGET_OS_WINDOWS) |
| 717 | 722 |
| 718 #endif // !defined(DART_IO_DISABLED) | 723 #endif // !defined(DART_IO_DISABLED) |
| OLD | NEW |