Direct Sockets API: Align with WebSocketStream API.
This CL effectively refactors the idl representation of direct sockets.
Most notable changes:
* No more nesting under navigator: navigator.openTCPSocket(...) -> new TCPSocket(...)
* Member accessors are now replaced with a singleton promise socket.connection that returns all necessary info (readable/writable/local_address/peer_address)
* A member promise closed is introduced that resolves on user-initiated close and rejects on socket error
* close() by default rejects if streams are locked. Use close({force: true}) to bypass this.
Bug: 1306873
Change-Id: I9a0083837939344ca0cecb43dfc97e40009a0eb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3528783
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Andrew Rayskiy <greengrape@google.com>
Cr-Commit-Position: refs/heads/main@{#986969}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.