Skip to content

Consider dropping read / write from streams in pro of Web Streams #640

@saghul

Description

@saghul

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions