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); | |
153 } | 144 } |
154 | 145 |
155 | 146 |
156 /** | 147 /** |
157 * A [NetworkInterface] represents an active network interface on the current | 148 * A [NetworkInterface] represents an active network interface on the current |
158 * system. It contains a list of [InternetAddress]es that are bound to the | 149 * system. It contains a list of [InternetAddress]es that are bound to the |
159 * interface. | 150 * interface. |
160 */ | 151 */ |
161 abstract class NetworkInterface { | 152 abstract class NetworkInterface { |
162 /** | 153 /** |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 } | 720 } |
730 if (address != null) { | 721 if (address != null) { |
731 sb.write(", address = ${address.host}"); | 722 sb.write(", address = ${address.host}"); |
732 } | 723 } |
733 if (port != null) { | 724 if (port != null) { |
734 sb.write(", port = $port"); | 725 sb.write(", port = $port"); |
735 } | 726 } |
736 return sb.toString(); | 727 return sb.toString(); |
737 } | 728 } |
738 } | 729 } |
OLD | NEW |