-
Notifications
You must be signed in to change notification settings - Fork 202
Consider dropping read / write from streams in pro of Web Streams #640
Description
Currently both are implemented, with the latter being implemented on top of the former.
We are basically compatible with the WinterCG Sockets API: https://sockets-api.proposal.wintercg.org/ and I guess it may make most sense not to deviate where unnecessary?
Doing this change might involve switching the way we do things to do it "push" style with callbacks from the native side to reduce overhead.
A starting point could be to drop the "old" API while still using it internally.
UDP would need to remain as is, since it's not a stream. The only annoyance there is that currently the read/write APIs are almost symetrical but then again, they are not really simmetrical...
Oh, "file streams" like when stdio is redirected, but also when opening regular files, should also be considered. We'd use the pull mode there, since it matches the underlying API.