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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 */ | 104 */ |
105 bool get isMulticast; | 105 bool get isMulticast; |
106 | 106 |
107 /** | 107 /** |
108 * Creates a new [InternetAddress] from a numeric address. | 108 * Creates a new [InternetAddress] from a numeric address. |
109 * | 109 * |
110 * If the address in [address] is not a numeric IPv4 | 110 * If the address in [address] is not a numeric IPv4 |
111 * (dotted-decimal notation) or IPv6 (hexadecimal representation). | 111 * (dotted-decimal notation) or IPv6 (hexadecimal representation). |
112 * address [ArgumentError] is thrown. | 112 * address [ArgumentError] is thrown. |
113 */ | 113 */ |
114 factory InternetAddress(String address) => | 114 external InternetAddress(String address); |
ngeoffray
2013/11/20 11:57:08
No need for factory?
Søren Gjesse
2013/11/20 12:02:37
Thats what I tried first, but that fails:
sdk/lib
| |
115 new _InternetAddress.parse(address); | |
116 | 115 |
117 /** | 116 /** |
118 * Perform a reverse dns lookup on the [address], creating a new | 117 * Perform a reverse dns lookup on the [address], creating a new |
119 * [InternetAddress] where the host field set to the result. | 118 * [InternetAddress] where the host field set to the result. |
120 */ | 119 */ |
121 Future<InternetAddress> reverse(); | 120 Future<InternetAddress> reverse(); |
122 | 121 |
123 /** | 122 /** |
124 * Lookup a host, returning a Future of a list of | 123 * Lookup a host, returning a Future of a list of |
125 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it | 124 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
526 } | 525 } |
527 if (address != null) { | 526 if (address != null) { |
528 sb.write(", address = ${address.host}"); | 527 sb.write(", address = ${address.host}"); |
529 } | 528 } |
530 if (port != null) { | 529 if (port != null) { |
531 sb.write(", port = $port"); | 530 sb.write(", port = $port"); |
532 } | 531 } |
533 return sb.toString(); | 532 return sb.toString(); |
534 } | 533 } |
535 } | 534 } |
OLD | NEW |