| 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 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/eventhandler.h" | 9 #include "bin/eventhandler.h" |
| 10 #include "bin/file.h" | 10 #include "bin/file.h" |
| 11 #include "bin/log.h" | 11 #include "bin/log.h" |
| 12 #include "bin/socket.h" | 12 #include "bin/socket.h" |
| 13 #include "bin/thread.h" |
| 13 #include "bin/utils.h" | 14 #include "bin/utils.h" |
| 14 | 15 |
| 15 #include "vm/thread.h" | |
| 16 | |
| 17 | |
| 18 namespace dart { | 16 namespace dart { |
| 19 namespace bin { | 17 namespace bin { |
| 20 | 18 |
| 21 SocketAddress::SocketAddress(struct sockaddr* sockaddr) { | 19 SocketAddress::SocketAddress(struct sockaddr* sockaddr) { |
| 22 ASSERT(INET6_ADDRSTRLEN >= INET_ADDRSTRLEN); | 20 ASSERT(INET6_ADDRSTRLEN >= INET_ADDRSTRLEN); |
| 23 RawAddr* raw = reinterpret_cast<RawAddr*>(sockaddr); | 21 RawAddr* raw = reinterpret_cast<RawAddr*>(sockaddr); |
| 24 | 22 |
| 25 // Clear the port before calling WSAAddressToString as WSAAddressToString | 23 // Clear the port before calling WSAAddressToString as WSAAddressToString |
| 26 // includes the port in the formatted string. | 24 // includes the port in the formatted string. |
| 27 int err = Socket::FormatNumericAddress(raw, as_string_, INET6_ADDRSTRLEN); | 25 int err = Socket::FormatNumericAddress(raw, as_string_, INET6_ADDRSTRLEN); |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 proto, | 717 proto, |
| 720 MCAST_LEAVE_GROUP, | 718 MCAST_LEAVE_GROUP, |
| 721 reinterpret_cast<char *>(&mreq), | 719 reinterpret_cast<char *>(&mreq), |
| 722 sizeof(mreq)) == 0; | 720 sizeof(mreq)) == 0; |
| 723 } | 721 } |
| 724 | 722 |
| 725 } // namespace bin | 723 } // namespace bin |
| 726 } // namespace dart | 724 } // namespace dart |
| 727 | 725 |
| 728 #endif // defined(TARGET_OS_WINDOWS) | 726 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |