| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 * Returns true if the [InternetAddress] is a loopback address. | 90 * Returns true if the [InternetAddress] is a loopback address. |
| 91 */ | 91 */ |
| 92 bool get isLoopback; | 92 bool get isLoopback; |
| 93 | 93 |
| 94 /** | 94 /** |
| 95 * Returns true if the [InternetAddress]s scope is a link-local. | 95 * Returns true if the [InternetAddress]s scope is a link-local. |
| 96 */ | 96 */ |
| 97 bool get isLinkLocal; | 97 bool get isLinkLocal; |
| 98 | 98 |
| 99 /** | 99 /** |
| 100 * Perform a reverse dns lookup on the [address], creating a new |
| 101 * [InternetAddress] where the host field set to the result. |
| 102 */ |
| 103 Future<InternetAddress> reverse(); |
| 104 |
| 105 /** |
| 100 * Lookup a host, returning a Future of a list of | 106 * Lookup a host, returning a Future of a list of |
| 101 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it | 107 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it |
| 102 * will lookup both IP version 4 (IPv4) and IP version 6 (IPv6) | 108 * will lookup both IP version 4 (IPv4) and IP version 6 (IPv6) |
| 103 * addresses. If [type] is either [InternetAddressType.IP_V4] or | 109 * addresses. If [type] is either [InternetAddressType.IP_V4] or |
| 104 * [InternetAddressType.IP_V6] it will only lookup addresses of the | 110 * [InternetAddressType.IP_V6] it will only lookup addresses of the |
| 105 * specified type. The order of the list can, and most likely will, | 111 * specified type. The order of the list can, and most likely will, |
| 106 * change over time. | 112 * change over time. |
| 107 */ | 113 */ |
| 108 external static Future<List<InternetAddress>> lookup( | 114 external static Future<List<InternetAddress>> lookup( |
| 109 String host, {InternetAddressType type: InternetAddressType.ANY}); | 115 String host, {InternetAddressType type: InternetAddressType.ANY}); |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 sb.write(" ($osError)"); | 475 sb.write(" ($osError)"); |
| 470 } | 476 } |
| 471 } else if (osError != null) { | 477 } else if (osError != null) { |
| 472 sb.write(": $osError"); | 478 sb.write(": $osError"); |
| 473 } | 479 } |
| 474 return sb.toString(); | 480 return sb.toString(); |
| 475 } | 481 } |
| 476 final String message; | 482 final String message; |
| 477 final OSError osError; | 483 final OSError osError; |
| 478 } | 484 } |
| OLD | NEW |