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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | tests/standalone/io/internet_address_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 * all adapters IP addresses using IP version 6 (IPv6). 70 * all adapters IP addresses using IP version 6 (IPv6).
71 */ 71 */
72 external static InternetAddress get ANY_IP_V6; 72 external static InternetAddress get ANY_IP_V6;
73 73
74 /** 74 /**
75 * The [type] of the [InternetAddress] specified what IP protocol. 75 * The [type] of the [InternetAddress] specified what IP protocol.
76 */ 76 */
77 InternetAddressType type; 77 InternetAddressType type;
78 78
79 /** 79 /**
80 * The resolved address of the host. 80 * The numeric address of the host. For IPv4 addresses this is using
81 * the dotted-decimal notation. For IPv6 it is using the
82 * hexadecimal representation.
81 */ 83 */
82 String get address; 84 String get address;
83 85
84 /** 86 /**
85 * The host used to lookup the address. 87 * The host used to lookup the address. If there is no host
88 * associated with the address this returns the numeric address.
86 */ 89 */
87 String get host; 90 String get host;
88 91
89 /** 92 /**
90 * Returns true if the [InternetAddress] is a loopback address. 93 * Returns true if the [InternetAddress] is a loopback address.
91 */ 94 */
92 bool get isLoopback; 95 bool get isLoopback;
93 96
94 /** 97 /**
95 * Returns true if the [InternetAddress]s scope is a link-local. 98 * Returns true if the [InternetAddress]s scope is a link-local.
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 sb.write("SocketException"); 503 sb.write("SocketException");
501 if (!message.isEmpty) { 504 if (!message.isEmpty) {
502 sb.write(": $message"); 505 sb.write(": $message");
503 if (osError != null) { 506 if (osError != null) {
504 sb.write(" ($osError)"); 507 sb.write(" ($osError)");
505 } 508 }
506 } else if (osError != null) { 509 } else if (osError != null) {
507 sb.write(": $osError"); 510 sb.write(": $osError");
508 } 511 }
509 if (address != null) { 512 if (address != null) {
510 if (address.host.isNotEmpty) { 513 sb.write(", address = ${address.host}");
511 sb.write(", address = ${address.host}");
512 } else {
513 sb.write(", address = ${address.address}");
514 }
515 } 514 }
516 if (port != null) { 515 if (port != null) {
517 sb.write(", port = $port"); 516 sb.write(", port = $port");
518 } 517 }
519 return sb.toString(); 518 return sb.toString();
520 } 519 }
521 } 520 }
OLDNEW
« 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