PSA: Direct Sockets in Chrome Apps

284 views
Skip to first unread message

Andrew Rayskiy

unread,
Apr 15, 2024, 7:44:20 AMApr 15
to blink-dev
Contact emails

green...@google.com


Explainer

https://github.com/WICG/direct-sockets/blob/main/docs/explainer.md


Specification

https://wicg.github.io/direct-sockets


Summary

Allows web apps to establish direct transmission control protocol (TCP) and user datagram protocol (UDP) communications with network devices and systems. This API provides a modern and higher-performance alternative to the deprecated chrome.socket, chrome.sockets.tcp, chrome.sockets.tcpServer and chrome.sockets.udp APIs.


This API was designed for Isolated Web Apps and will be part of a future “Intent to Ship” for that feature. It is being enabled early for Chrome Apps in order to provide developers a smooth migration path. We are confident that at this stage the design of the API is complete.


Blink component

Blink>Network>Direct Sockets


Risks

Interoperability and Compatibility

Gecko: Negative (https://github.com/mozilla/standards-positions/issues/431)


WebKit: No signal


Web developers: Web developers report that this API meets their use cases and provides better performance than the Chrome Apps APIs it replaces due to a combination of internal implementation details and its support for TCP backpressure.


Other signals:


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None, Direct Sockets are not available in WebViews.



Debuggability

Devtools



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

No, it is only supported on desktop platforms (where Chrome Apps are available)


Is this feature fully tested by web-platform-tests?

No, testing for Chrome Apps is covered by Chrome browser tests.


Flag name on chrome://flags

None


Finch feature name

DirectSocketsInChromeApps


Requires code in //chrome?

True


Tracking bug

https://issues.chromium.org/issues/329445684


Launch bug

https://launch.corp.google.com/launch/4314221


Estimated milestones
125

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5168654087094272


Links to previous Intent discussions

Intent to prototype:

https://groups.google.com/a/chromium.org/g/blink-dev/c/ARtkaw4e9T4/m/Ad2MPxWTBwAJ



PhistucK

unread,
Apr 15, 2024, 9:41:12 AMApr 15
to Andrew Rayskiy, blink-dev
This is a little strange considering "Chrome apps" are quite close to being completely removed from Chrome altogether...
I understand the reason, but this is continuing development on something that should not be further developed, sending mixed signals.

PhistucK


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/97c2c97c-b41e-4936-a729-3b0f7f03d0c7n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages