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

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

Issue 180163005: Add InternetAddress:rawAddress, to return the raw address as a list of bytes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 */ 83 */
84 String get address; 84 String get address;
85 85
86 /** 86 /**
87 * The host used to lookup the address. If there is no host 87 * The host used to lookup the address. If there is no host
88 * associated with the address this returns the numeric address. 88 * associated with the address this returns the numeric address.
89 */ 89 */
90 String get host; 90 String get host;
91 91
92 /** 92 /**
93 * Get the raw address of this [InternetAddress]. The result is either a
94 * 4 or 16 byte long list. The returned list is a copy, making it possible
95 * to change the list without modifying the [InternetAddress].
96 */
97 List<int> get rawAddress;
98
99 /**
93 * Returns true if the [InternetAddress] is a loopback address. 100 * Returns true if the [InternetAddress] is a loopback address.
94 */ 101 */
95 bool get isLoopback; 102 bool get isLoopback;
96 103
97 /** 104 /**
98 * Returns true if the [InternetAddress]s scope is a link-local. 105 * Returns true if the [InternetAddress]s scope is a link-local.
99 */ 106 */
100 bool get isLinkLocal; 107 bool get isLinkLocal;
101 108
102 /** 109 /**
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 671 }
665 if (address != null) { 672 if (address != null) {
666 sb.write(", address = ${address.host}"); 673 sb.write(", address = ${address.host}");
667 } 674 }
668 if (port != null) { 675 if (port != null) {
669 sb.write(", port = $port"); 676 sb.write(", port = $port");
670 } 677 }
671 return sb.toString(); 678 return sb.toString();
672 } 679 }
673 } 680 }
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