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

Side by Side Diff: sdk/lib/io/socket.dart

Issue 76383002: Update InternetAddress (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review commetns 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_win.cc ('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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 * Returns true if the [InternetAddress] is a loopback address. 93 * Returns true if the [InternetAddress] is a loopback address.
94 */ 94 */
95 bool get isLoopback; 95 bool get isLoopback;
96 96
97 /** 97 /**
98 * Returns true if the [InternetAddress]s scope is a link-local. 98 * Returns true if the [InternetAddress]s scope is a link-local.
99 */ 99 */
100 bool get isLinkLocal; 100 bool get isLinkLocal;
101 101
102 /** 102 /**
103 * Returns true if the [InternetAddress]s scope is multicast.
104 */
105 bool get isMulticast;
106
107 /**
108 * Creates a new [InternetAddress] from a numeric address.
109 *
110 * If the address in [address] is not a numeric IPv4
111 * (dotted-decimal notation) or IPv6 (hexadecimal representation).
112 * address [ArgumentError] is thrown.
113 */
114 factory InternetAddress(String address) =>
115 new _InternetAddress.parse(address);
116
117 /**
103 * Perform a reverse dns lookup on the [address], creating a new 118 * Perform a reverse dns lookup on the [address], creating a new
104 * [InternetAddress] where the host field set to the result. 119 * [InternetAddress] where the host field set to the result.
105 */ 120 */
106 Future<InternetAddress> reverse(); 121 Future<InternetAddress> reverse();
107 122
108 /** 123 /**
109 * Lookup a host, returning a Future of a list of 124 * Lookup a host, returning a Future of a list of
110 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it 125 * [InternetAddress]s. If [type] is [InternetAddressType.ANY], it
111 * will lookup both IP version 4 (IPv4) and IP version 6 (IPv6) 126 * will lookup both IP version 4 (IPv4) and IP version 6 (IPv6)
112 * addresses. If [type] is either [InternetAddressType.IP_V4] or 127 * addresses. If [type] is either [InternetAddressType.IP_V4] or
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 } 526 }
512 if (address != null) { 527 if (address != null) {
513 sb.write(", address = ${address.host}"); 528 sb.write(", address = ${address.host}");
514 } 529 }
515 if (port != null) { 530 if (port != null) {
516 sb.write(", port = $port"); 531 sb.write(", port = $port");
517 } 532 }
518 return sb.toString(); 533 return sb.toString();
519 } 534 }
520 } 535 }
OLDNEW
« no previous file with comments | « runtime/bin/socket_win.cc ('k') | tests/standalone/io/internet_address_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698