| 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 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * [InternetAddressType] is the type an [InternetAddress]. Currently, | 9 * [InternetAddressType] is the type an [InternetAddress]. Currently, |
| 10 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported. | 10 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 * Lookup a host, returning a Future of a list of | 134 * Lookup a host, returning a Future of a list of |
| 135 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it | 135 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it |
| 136 * will lookup both IP version 4 (IPv4) and IP version 6 (IPv6) | 136 * will lookup both IP version 4 (IPv4) and IP version 6 (IPv6) |
| 137 * addresses. If [type] is either [InternetAddressType.IP_V4] or | 137 * addresses. If [type] is either [InternetAddressType.IP_V4] or |
| 138 * [InternetAddressType.IP_V6] it will only lookup addresses of the | 138 * [InternetAddressType.IP_V6] it will only lookup addresses of the |
| 139 * specified type. The order of the list can, and most likely will, | 139 * specified type. The order of the list can, and most likely will, |
| 140 * change over time. | 140 * change over time. |
| 141 */ | 141 */ |
| 142 external static Future<List<InternetAddress>> lookup( | 142 external static Future<List<InternetAddress>> lookup( |
| 143 String host, {InternetAddressType type: InternetAddressType.ANY}); | 143 String host, {InternetAddressType type: InternetAddressType.ANY}); |
| 144 |
| 145 /** |
| 146 * Clones the given [address] with the new [host]. |
| 147 * |
| 148 * The [address] must be an [InternetAddress] that was created with one |
| 149 * of the static methods of this class. |
| 150 */ |
| 151 external static InternetAddress _cloneWithNewHost( |
| 152 InternetAddress address, String host); |
| 144 } | 153 } |
| 145 | 154 |
| 146 | 155 |
| 147 /** | 156 /** |
| 148 * A [NetworkInterface] represents an active network interface on the current | 157 * A [NetworkInterface] represents an active network interface on the current |
| 149 * system. It contains a list of [InternetAddress]es that are bound to the | 158 * system. It contains a list of [InternetAddress]es that are bound to the |
| 150 * interface. | 159 * interface. |
| 151 */ | 160 */ |
| 152 abstract class NetworkInterface { | 161 abstract class NetworkInterface { |
| 153 /** | 162 /** |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 } | 729 } |
| 721 if (address != null) { | 730 if (address != null) { |
| 722 sb.write(", address = ${address.host}"); | 731 sb.write(", address = ${address.host}"); |
| 723 } | 732 } |
| 724 if (port != null) { | 733 if (port != null) { |
| 725 sb.write(", port = $port"); | 734 sb.write(", port = $port"); |
| 726 } | 735 } |
| 727 return sb.toString(); | 736 return sb.toString(); |
| 728 } | 737 } |
| 729 } | 738 } |
| OLD | NEW |