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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 * system. It contains a list of [InternetAddress]s, that's bound to the | 138 * system. It contains a list of [InternetAddress]s, that's bound to the |
139 * interface. | 139 * interface. |
140 */ | 140 */ |
141 abstract class NetworkInterface { | 141 abstract class NetworkInterface { |
142 /** | 142 /** |
143 * Get the name of the [NetworkInterface]. | 143 * Get the name of the [NetworkInterface]. |
144 */ | 144 */ |
145 String get name; | 145 String get name; |
146 | 146 |
147 /** | 147 /** |
| 148 * Get the index of the [NetworkInterface]. |
| 149 */ |
| 150 String get index; |
| 151 |
| 152 /** |
148 * Get a list of [InternetAddress]s currently bound to this | 153 * Get a list of [InternetAddress]s currently bound to this |
149 * [NetworkInterface]. | 154 * [NetworkInterface]. |
150 */ | 155 */ |
151 List<InternetAddress> get addresses; | 156 List<InternetAddress> get addresses; |
152 | 157 |
153 /** | 158 /** |
154 * Query the system for [NetworkInterface]s. | 159 * Query the system for [NetworkInterface]s. |
155 * | 160 * |
156 * If [includeLoopback] is `true`, the returned list will include the | 161 * If [includeLoopback] is `true`, the returned list will include the |
157 * loopback device. Default is `false`. | 162 * loopback device. Default is `false`. |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 } | 530 } |
526 if (address != null) { | 531 if (address != null) { |
527 sb.write(", address = ${address.host}"); | 532 sb.write(", address = ${address.host}"); |
528 } | 533 } |
529 if (port != null) { | 534 if (port != null) { |
530 sb.write(", port = $port"); | 535 sb.write(", port = $port"); |
531 } | 536 } |
532 return sb.toString(); | 537 return sb.toString(); |
533 } | 538 } |
534 } | 539 } |
OLD | NEW |