Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: sdk/lib/io/socket.dart

Issue 76243002: Don't supply host names for the fixed internet addresses (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated after offline discussion Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | tests/standalone/io/internet_address_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/socket.dart
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index f821d8b7715ccde725f79beebc9cd5191323af46..978428bd406660e8cb5970cccc4b5a31c15d26c6 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -77,12 +77,15 @@ abstract class InternetAddress {
InternetAddressType type;
/**
- * The resolved address of the host.
+ * The numeric address of the host. For IPv4 addresses this is using
+ * the dotted-decimal notation. For IPv6 it is using the
+ * hexadecimal representation.
*/
String get address;
/**
- * The host used to lookup the address.
+ * The host used to lookup the address. If there is no host
+ * associated with the address this returns the numeric address.
*/
String get host;
@@ -507,11 +510,7 @@ class SocketException implements IOException {
sb.write(": $osError");
}
if (address != null) {
- if (address.host.isNotEmpty) {
- sb.write(", address = ${address.host}");
- } else {
- sb.write(", address = ${address.address}");
- }
+ sb.write(", address = ${address.host}");
}
if (port != null) {
sb.write(", port = $port");
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | tests/standalone/io/internet_address_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698