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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 */ | 83 */ |
84 String get address; | 84 String get address; |
85 | 85 |
86 /** | 86 /** |
87 * The host used to lookup the address. If there is no host | 87 * The host used to lookup the address. If there is no host |
88 * associated with the address this returns the numeric address. | 88 * associated with the address this returns the numeric address. |
89 */ | 89 */ |
90 String get host; | 90 String get host; |
91 | 91 |
92 /** | 92 /** |
| 93 * Get the raw address of this [InternetAddress]. The result is either a |
| 94 * 4 or 16 byte long list. The returned list is a copy, making it possible |
| 95 * to change the list without modifying the [InternetAddress]. |
| 96 */ |
| 97 List<int> get rawAddress; |
| 98 |
| 99 /** |
93 * Returns true if the [InternetAddress] is a loopback address. | 100 * Returns true if the [InternetAddress] is a loopback address. |
94 */ | 101 */ |
95 bool get isLoopback; | 102 bool get isLoopback; |
96 | 103 |
97 /** | 104 /** |
98 * Returns true if the [InternetAddress]s scope is a link-local. | 105 * Returns true if the [InternetAddress]s scope is a link-local. |
99 */ | 106 */ |
100 bool get isLinkLocal; | 107 bool get isLinkLocal; |
101 | 108 |
102 /** | 109 /** |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 } | 671 } |
665 if (address != null) { | 672 if (address != null) { |
666 sb.write(", address = ${address.host}"); | 673 sb.write(", address = ${address.host}"); |
667 } | 674 } |
668 if (port != null) { | 675 if (port != null) { |
669 sb.write(", port = $port"); | 676 sb.write(", port = $port"); |
670 } | 677 } |
671 return sb.toString(); | 678 return sb.toString(); |
672 } | 679 } |
673 } | 680 } |
OLD | NEW |