Skip to content

Remove code copied from the SDK #1552

@natebosch

Description

@natebosch

We currently have over a thousand lines of code to support a single API:

https://github.com/dart-lang/web_socket_channel/blob/c57baea6168b446a27745cf188fb0f54d539de2c/lib/src/channel.dart#L98-L102

That API has very little usage. I think the only Dart team usage may be from shelf_web_socket.

As far as I can tell, unless we either give access to the underlying Socket from the package:shelf APIs it is not possible to implement the shelf_web_socket behavior without this copied code from the SDK living somewhere.

We could consider adding a WebSocket.upgrade(Stream<List<int>>, StreamSink<List<int>>) static method in dart:io which I think would give us enough to remove the copied code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions