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

Issue 180163005: Add InternetAddress:rawAddress, to return the raw address as a list of bytes. (Closed)

Created:
6 years, 9 months ago by Anders Johnsen
Modified:
6 years, 9 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add InternetAddress:rawAddress, to return the raw address as a list of bytes. BUG=https://code.google.com/p/dart/issues/detail?id=17137

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -0 lines) Patch
M runtime/bin/socket_patch.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/io/socket.dart View 1 chunk +7 lines, -0 lines 0 comments Download
M tests/standalone/io/internet_address_test.dart View 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Anders Johnsen
6 years, 9 months ago (2014-03-03 10:40:16 UTC) #1
Anders Johnsen
6 years, 9 months ago (2014-03-03 13:35:15 UTC) #2
Søren Gjesse
lgtm. Please add the bug-reference to the description. We should add a InternetAddress.raw(List<int> address) constructor ...
6 years, 9 months ago (2014-03-03 15:30:43 UTC) #3
Anders Johnsen
Yeah, the only concern is what the host/address fields should be.
6 years, 9 months ago (2014-03-03 18:28:51 UTC) #4
Søren Gjesse
6 years, 9 months ago (2014-03-03 22:06:37 UTC) #5
Message was sent while issue was closed.
On 2014/03/03 18:28:51, Anders Johnsen wrote:
> Yeah, the only concern is what the host/address fields should be.

This should work the same as for numeric addresses. E.g.

  new InternetAddress("10.20.30.40")
  new InternetAddress.raw([10, 20, 30, 40])

both return "10.20.30.40" for address and host.

Likewise

  new InternetAddress("2a00:1450:400f:801::1012")
  new InternetAddress.raw([0x2a, 0, 0x14, 0x50, 0x40, 0xf, 8, 1, 0, 0, 0, 0, 0,
0, 0x10, 0x12])

both return "2a00:1450:400f:801::1012" for address and host.

So we need to add IPv4/IPv6 numeric address to string formatting.

Powered by Google App Engine
This is Rietveld 408576698