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

Issue 908873002: Add support to specify the source address for socket connect (Closed)

Created:
5 years, 10 months ago by Søren Gjesse
Modified:
5 years, 10 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add support to specify the source address for socket connect BUG=http://dartbug.com/22253 R=kustermann@google.com, lrn@google.com Committed: https://code.google.com/p/dart/source/detail?r=43638

Patch Set 1 #

Patch Set 2 : Fix Windows build #

Total comments: 6

Patch Set 3 : Rebased #

Patch Set 4 : Windows fix #

Total comments: 4

Patch Set 5 : Addressed review comments #

Patch Set 6 : Added dart2js patch file #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+303 lines, -44 lines) Patch
M runtime/bin/eventhandler_win.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/bin/eventhandler_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/io_natives.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/socket.h View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/bin/socket.cc View 1 chunk +19 lines, -0 lines 0 comments Download
M runtime/bin/socket_android.cc View 1 2 3 4 3 chunks +24 lines, -5 lines 0 comments Download
M runtime/bin/socket_linux.cc View 1 2 3 4 3 chunks +24 lines, -5 lines 0 comments Download
M runtime/bin/socket_macos.cc View 1 2 3 4 3 chunks +24 lines, -5 lines 0 comments Download
M runtime/bin/socket_patch.dart View 6 chunks +24 lines, -8 lines 0 comments Download
M runtime/bin/socket_win.cc View 1 2 3 4 3 chunks +28 lines, -13 lines 0 comments Download
M sdk/lib/_internal/compiler/js_lib/io_patch.dart View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/io/socket.dart View 2 chunks +12 lines, -2 lines 4 comments Download
A tests/standalone/io/socket_source_address_test.dart View 1 2 3 4 1 chunk +136 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
Søren Gjesse
5 years, 10 months ago (2015-02-09 16:41:44 UTC) #3
kustermann
lgtm https://codereview.chromium.org/908873002/diff/20001/tests/standalone/io/socket_source_address_test.dart File tests/standalone/io/socket_source_address_test.dart (right): https://codereview.chromium.org/908873002/diff/20001/tests/standalone/io/socket_source_address_test.dart#newcode91 tests/standalone/io/socket_source_address_test.dart:91: } Since there is no difference at all ...
5 years, 10 months ago (2015-02-10 10:06:55 UTC) #4
Søren Gjesse
https://codereview.chromium.org/908873002/diff/20001/tests/standalone/io/socket_source_address_test.dart File tests/standalone/io/socket_source_address_test.dart (right): https://codereview.chromium.org/908873002/diff/20001/tests/standalone/io/socket_source_address_test.dart#newcode91 tests/standalone/io/socket_source_address_test.dart:91: } On 2015/02/10 10:06:54, kustermann wrote: > Since there ...
5 years, 10 months ago (2015-02-10 11:13:33 UTC) #6
Søren Gjesse
Committed patchset #6 (id:100001) manually as 43638.
5 years, 10 months ago (2015-02-10 11:57:25 UTC) #7
kevmoo
https://codereview.chromium.org/908873002/diff/100001/sdk/lib/io/socket.dart File sdk/lib/io/socket.dart (right): https://codereview.chromium.org/908873002/diff/100001/sdk/lib/io/socket.dart#newcode462 sdk/lib/io/socket.dart:462: external static Future<RawSocket> connect(host, int port, {sourceAddress}); What's the ...
5 years, 10 months ago (2015-02-10 15:07:08 UTC) #9
kustermann
https://codereview.chromium.org/908873002/diff/100001/sdk/lib/io/socket.dart File sdk/lib/io/socket.dart (right): https://codereview.chromium.org/908873002/diff/100001/sdk/lib/io/socket.dart#newcode125 sdk/lib/io/socket.dart:125: external factory InternetAddress(String address); See here. https://codereview.chromium.org/908873002/diff/100001/sdk/lib/io/socket.dart#newcode462 sdk/lib/io/socket.dart:462: external ...
5 years, 10 months ago (2015-02-10 15:15:37 UTC) #10
Søren Gjesse
5 years, 10 months ago (2015-02-11 10:12:22 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/908873002/diff/100001/sdk/lib/io/socket.dart
File sdk/lib/io/socket.dart (right):

https://codereview.chromium.org/908873002/diff/100001/sdk/lib/io/socket.dart#...
sdk/lib/io/socket.dart:462: external static Future<RawSocket> connect(host, int
port, {sourceAddress});
On 2015/02/10 15:15:37, kustermann wrote:
> On 2015/02/10 15:07:08, kevmoo wrote:
> > What's the expected format of `sourceAddress` if not `InternetAddress?
> > 
> > Just want to understand what we need to support String.
> 
> Because it's much more convenient to write. It's a shorthand for `new
> InternetAddress(sourceAddress)`. You can check the documentation above.
> 
> "must hold a numeric IP address" means  e.g. `1.2.3.4` or `ff02::1`.

I thought about this, and with the first argument 'host' we already went with
type dynamic. Of course when 'host' is a string is can be any DNS address. So
for consistency sourceAddress is dynamic.

Powered by Google App Engine
This is Rietveld 408576698