| 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 28 matching lines...) Expand all Loading... |
| 39 String toString() => "InternetAddressType: $name"; | 39 String toString() => "InternetAddressType: $name"; |
| 40 } | 40 } |
| 41 | 41 |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * The [InternetAddress] is an object reflecting either a remote or a | 44 * The [InternetAddress] is an object reflecting either a remote or a |
| 45 * local address. When combined with a port number, this represents a | 45 * local address. When combined with a port number, this represents a |
| 46 * endpoint that a socket can connect to or a listening socket can | 46 * endpoint that a socket can connect to or a listening socket can |
| 47 * bind to. | 47 * bind to. |
| 48 */ | 48 */ |
| 49 abstract class InternetAddress { | 49 class InternetAddress { |
| 50 /** | 50 /** |
| 51 * IP version 4 loopback address. Use this address when listening on | 51 * IP version 4 loopback address. Use this address when listening on |
| 52 * or connecting to the loopback adapter using IP version 4 (IPv4). | 52 * or connecting to the loopback adapter using IP version 4 (IPv4). |
| 53 */ | 53 */ |
| 54 external static InternetAddress get LOOPBACK_IP_V4; | 54 external static InternetAddress get LOOPBACK_IP_V4; |
| 55 | 55 |
| 56 /** | 56 /** |
| 57 * IP version 6 loopback address. Use this address when listening on | 57 * IP version 6 loopback address. Use this address when listening on |
| 58 * or connecting to the loopback adapter using IP version 6 (IPv6). | 58 * or connecting to the loopback adapter using IP version 6 (IPv6). |
| 59 */ | 59 */ |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 } | 525 } |
| 526 if (address != null) { | 526 if (address != null) { |
| 527 sb.write(", address = ${address.host}"); | 527 sb.write(", address = ${address.host}"); |
| 528 } | 528 } |
| 529 if (port != null) { | 529 if (port != null) { |
| 530 sb.write(", port = $port"); | 530 sb.write(", port = $port"); |
| 531 } | 531 } |
| 532 return sb.toString(); | 532 return sb.toString(); |
| 533 } | 533 } |
| 534 } | 534 } |
| OLD | NEW |