mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:45:06 +00:00
935ee25f3b
This adds [sendMessage] and [receiveMessage] methods to [RawSocket] class. They are only supported on Linux at the moment as they require connection opened as unix domain socket connection. This introduces [SocketControlMessage] class that represents a message sent via socket and also introduces [ResourceHandle] class that wraps [RandomAccessFile], [Socket]/[RawSocket]/[RawDatagramSocket], [Stdin]/[Stdout] for marshalling/unmarshalling purposes. Underlying OS implementation supports various kinds of control messages that can be passed via sockets, this CL only adds support for sending/receiving opened file description handles. When receiving a message recipient can attempt to extract handles out of it via [tryExtractHandles]. It returns [null] if message has no handles to extract. This is continuation of the work started on https://dart-review.googlesource.com/c/sdk/+/205067. Bug: https://github.com/dart-lang/sdk/issues/46328 TEST=unix_socket_test Change-Id: Ic9125b51dc80b677452e454366bae4118c298081 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212036 Commit-Queue: Alexander Aprelev <aam@google.com> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com> Reviewed-by: Zach Anderson <zra@google.com> |
||
---|---|---|
.. | ||
bin | ||
docs | ||
include | ||
lib | ||
observatory | ||
observatory_2 | ||
platform | ||
tests | ||
third_party | ||
tools | ||
vm | ||
.clang-tidy | ||
.gitignore | ||
BUILD.gn | ||
codereview.settings | ||
configs.gni | ||
CPPLINT.cfg | ||
PRESUBMIT.py | ||
runtime_args.gni |