shelf icon indicating copy to clipboard operation
shelf copied to clipboard

Added support for WebSockets

Open Martoxdlol opened this issue 1 year ago • 5 comments

Hello! I added support for proxying websockets. It is implemented checking the 'Upgrade' header and using shelf_web_socket and web_socket_channel packages.

Martoxdlol avatar Sep 16 '23 02:09 Martoxdlol

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Sep 16 '23 02:09 google-cla[bot]

Hello, could someone review this?

Martoxdlol avatar Jan 27 '24 20:01 Martoxdlol

@natebosch @devoncarew @brianquinlan – thoughts?

kevmoo avatar Jan 27 '24 21:01 kevmoo

This package currently does not have imports to dart:io. I don't know that there is utility in running this code anywhere without dart:io, but adding the new dependencies and the new platform restriction is probably enough reason to not add this support.

I wonder if there is some way can make this pluggable.

Or is the import 'package:web_socket_channel/io.dart'; required - maybe we can use the cross platform import for connecting the socket?

natebosch avatar Jan 30 '24 20:01 natebosch

This package currently does not have imports to dart:io. I don't know that there is utility in running this code anywhere without dart:io, but adding the new dependencies and the new platform restriction is probably enough reason to not add this support.

I wonder if there is some way can make this pluggable.

Or is the import 'package:web_socket_channel/io.dart'; required - maybe we can use the cross platform import for connecting the socket?

Hmmm I didn't think about that. I will look for another solution.

Maybe I can make a separate package that adds websockets or something.

Martoxdlol avatar Feb 09 '24 03:02 Martoxdlol