Commit graph

15 commits

Author SHA1 Message Date
Zach Anderson aa9201b76b [vm] Prefix HOST_OS_* and TARGET_OS_* with DART_
TargetConditionals.h for XCode 13 defines several
TARGET_OS_* preprocessor symbols that confuse the
Dart build. There is probably a more targeted fix
for this, but renaming the symbols that Dart uses
will also prevent this problem if more symbols
are added to the platform headers in the future.

See: https://github.com/dart-lang/sdk/issues/46499

TEST=It builds.
Change-Id: I3b33a03b4a9a14b76d55fe12f8cdefec4b3c3664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205633
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-07-02 06:02:48 +00:00
asiva 0742ed66a7 [VM/Tests] - Fix new abstract_socket_test.
- Skip in configurations that do not build the abstract_socket_test
executable
- Fix MemorySanitizer: use-of-uninitialized-value error

TEST=existing test - unix-socket-test

Change-Id: Ie9bf6dc1cd6bea98cd7859584473154f6ac49eee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201722
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-05-29 00:16:34 +00:00
Zichang Guo fdf4762c99 Reland "[dart:io] Fix hanging on zero-length datagram"
This is a reland of c326c587c5

The fix is to remove "_availableDatagram" check at the start of receive(). Since receive() can be called without receiver being listening, this check will block the receive().

Original change's description:
> [dart:io] Fix hanging on zero-length datagram
>
> This is observed on Win and Linux.
> Here is a doc to explain the problem: https://docs.google.com/document/d/1ZzyBUMrDHLU6vNryjgSMJfUruOdpmTImtE_s2E0J8IQ/edit?usp=sharing.
>
> Bug: https://github.com/dart-lang/sdk/issues/39910
> Change-Id: Ia961239f45615f14108bcd66043ac33d9a0a4abe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137425
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

Bug: https://github.com/dart-lang/sdk/issues/39910
Change-Id: Iefc0af96ed4e1b433396bb5fe11276e8a04c00d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140164
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-03-27 15:28:23 +00:00
Zichang Guo ed83a28d3e [dart:io] support Unix domain communications
Support Unix domain sockets communication on Linux, MacOS and Android.

Changes:
1. Add a field for InternetAddressType named unix.
2. Constructor of InternetAddress gains one more optional field: type. InternetAddress(String address, {InternetAddressType type});
3. Add another constructor to InternetAddress which taks raw address/path for ip/unix addresses as an argument. InternetAddress.fromRawAddress(Uint8List rawAddress, {InternetAddressType type});

The operation for unix domain sockets communication is basically the same as normal sockets except an InternetAddress with type unix should be passed.

Change-Id: I6a1135bbdd7f4e4fc745ccf8f95dec5272b6839b
Bug: https://github.com/dart-lang/sdk/issues/21403
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125932
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-03-23 03:51:40 +00:00
Zichang Guo e91e09d1e4 Revert "[dart:io] Fix hanging on zero-length datagram"
This reverts commit c326c587c5.

Reason for revert: Analyzer and Co19 test is broken.

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8885365974080167440/+/steps/test_results/0/logs/new_test_failures__logs_/0

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8885364415750725248/+/steps/test_results/0/logs/new_test_failures__logs_/0

Original change's description:
> [dart:io] Fix hanging on zero-length datagram
> 
> This is observed on Win and Linux.
> Here is a doc to explain the problem: https://docs.google.com/document/d/1ZzyBUMrDHLU6vNryjgSMJfUruOdpmTImtE_s2E0J8IQ/edit?usp=sharing.
> 
> Bug: https://github.com/dart-lang/sdk/issues/39910
> Change-Id: Ia961239f45615f14108bcd66043ac33d9a0a4abe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137425
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=sortie@google.com,lrn@google.com,zra@google.com,asiva@google.com,zichangguo@google.com

Change-Id: Id84a7cafbc14d6353fa6af8e294e8b0c751a969f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/39910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140009
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-03-19 23:05:59 +00:00
Zichang Guo c326c587c5 [dart:io] Fix hanging on zero-length datagram
This is observed on Win and Linux.
Here is a doc to explain the problem: https://docs.google.com/document/d/1ZzyBUMrDHLU6vNryjgSMJfUruOdpmTImtE_s2E0J8IQ/edit?usp=sharing.

Bug: https://github.com/dart-lang/sdk/issues/39910
Change-Id: Ia961239f45615f14108bcd66043ac33d9a0a4abe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137425
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-03-19 20:23:08 +00:00
Zichang Guo 92ed74e5f1 Reland "[vm] support zoneID for http"
This is a reland of c3db2e3ee0

Original change's description:
> [vm] support zoneID for http
> 
> Coming from https://dart-review.googlesource.com/c/sdk/+/103544.
> 
> Fixes: https://github.com/dart-lang/sdk/issues/37570
> Change-Id: I0f81cb5d8009dc929fca24e03a343a7b0c1597bc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110121
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Zichang Guo <zichangguo@google.com>

Change-Id: I3692bf02fd29bc3bc8b9b54de1466075fecec1f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115605
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-09-05 14:54:48 +00:00
Zichang Guo 05b7c55e8f Revert "[vm] support zoneID for http"
This reverts commit c3db2e3ee0.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [vm] support zoneID for http
> 
> Coming from https://dart-review.googlesource.com/c/sdk/+/103544.
> 
> Fixes: https://github.com/dart-lang/sdk/issues/37570
> Change-Id: I0f81cb5d8009dc929fca24e03a343a7b0c1597bc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110121
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Zichang Guo <zichangguo@google.com>

TBR=lrn@google.com,zra@google.com,asiva@google.com,zichangguo@google.com

Change-Id: I41e52b905b112a0e6f2a6c2c8c135a9ec6ef6869
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115604
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-09-04 22:17:48 +00:00
Zichang Guo c3db2e3ee0 [vm] support zoneID for http
Coming from https://dart-review.googlesource.com/c/sdk/+/103544.

Fixes: https://github.com/dart-lang/sdk/issues/37570
Change-Id: I0f81cb5d8009dc929fca24e03a343a7b0c1597bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110121
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-09-04 15:42:01 +00:00
Dan Field 5b1daaac6c Exposes a thin layer over getsockopt/setsockopt for supported platforms.
This allows developers to have more fine grained control over socket
options supported by their platforms, particularly when there is not a
nice way to encapsulate differences between IPv4 and IPv6 options (as
with IP_MULTICAST_IF and IPV6_MULTICAST_IF).  It also begins the work
of exposing socket level and option values, although keeping it for now
only to a minimum necessary to assist with setting the multicast
interface for datagram sockets.

This CL also marks `multicastInterface` as deprecated.

Bug: https://github.com/dart-lang/sdk/issues/17057
Change-Id: I39b3bf3d32d39de1c777acea4425d6eb2226355d
Reviewed-on: https://dart-review.googlesource.com/c/89164
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-01-17 23:05:21 +00:00
Zachary Anderson 747868f2b1 [dart:io] Remove DART_IO_DISABLED
This was only used by Dartium.

Review-Url: https://codereview.chromium.org/3009523002 .
2017-08-24 11:17:52 -07:00
Zachary Anderson bdb4eb6338 [dart:io][windows] Implements RawSynchronousSocket
related #29343
fixes #29333

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2830273002 .
2017-04-21 23:29:52 -07:00
Ben Konyi ddc4f30d75 Re-land socket refactor with fixes for Windows.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2797993005 .
2017-04-05 12:45:31 -07:00
Ben Konyi 0386f7ab6f Reverting until bots clear up.
Revert "Pulled a significant portion of Socket implementation into BaseSocket in order to prepare for the synchronous socket impementations which will also use these common methods."

This reverts commit 0422920142.

Revert "Updated incorrect call to Write in process_win.cc"

This reverts commit 9e1435148b.

Revert "Fixed incorrect call to Write from process_win.cc"

This reverts commit 11dcab2bed3c9ec8ec76bc200206ac202a4a5681.

Fixed incorrect call to Write from process_win.cc

BUG=

Review-Url: https://codereview.chromium.org/2791163004 .
2017-04-03 17:25:47 -07:00
Ben Konyi 0422920142 Pulled a significant portion of Socket implementation into BaseSocket in order to prepare for the synchronous socket impementations which will also use these common methods.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2780063002 .
2017-04-03 17:05:11 -07:00