| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 /** | 89 /** |
| 90 * Lookup a host, returning a Future of a list of | 90 * Lookup a host, returning a Future of a list of |
| 91 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it | 91 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it |
| 92 * will lookup both IP version 4 (IPv4) and IP version 6 (IPv6) | 92 * will lookup both IP version 4 (IPv4) and IP version 6 (IPv6) |
| 93 * addresses. If [type] is either [InternetAddressType.IP_V4] or | 93 * addresses. If [type] is either [InternetAddressType.IP_V4] or |
| 94 * [InternetAddressType.IP_V6] it will only lookup addresses of the | 94 * [InternetAddressType.IP_V6] it will only lookup addresses of the |
| 95 * specified type. The order of the list can, and most likely will, | 95 * specified type. The order of the list can, and most likely will, |
| 96 * change over time. | 96 * change over time. |
| 97 */ | 97 */ |
| 98 external static Future<List<InternetAddress>> lookup( | 98 external static Future<List<InternetAddress>> lookup( |
| 99 String host, {InternetAddressType type: InternetAddressType.IP_V4}); | 99 String host, {InternetAddressType type: InternetAddressType.ANY}); |
| 100 } | 100 } |
| 101 | 101 |
| 102 /** | 102 /** |
| 103 * A [RawServerSocket] represents a listening socket, and provides a | 103 * A [RawServerSocket] represents a listening socket, and provides a |
| 104 * stream of low-level [RawSocket] objects, one for each connection | 104 * stream of low-level [RawSocket] objects, one for each connection |
| 105 * made to the listening socket. | 105 * made to the listening socket. |
| 106 * | 106 * |
| 107 * See [RawSocket] for more info. | 107 * See [RawSocket] for more info. |
| 108 */ | 108 */ |
| 109 abstract class RawServerSocket implements Stream<RawSocket> { | 109 abstract class RawServerSocket implements Stream<RawSocket> { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 sb.write(" ($osError)"); | 418 sb.write(" ($osError)"); |
| 419 } | 419 } |
| 420 } else if (osError != null) { | 420 } else if (osError != null) { |
| 421 sb.write(": $osError"); | 421 sb.write(": $osError"); |
| 422 } | 422 } |
| 423 return sb.toString(); | 423 return sb.toString(); |
| 424 } | 424 } |
| 425 final String message; | 425 final String message; |
| 426 final OSError osError; | 426 final OSError osError; |
| 427 } | 427 } |
| OLD | NEW |