http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.46k stars 120 forks source link

WebSocket client support #186

Open gmosx opened 4 years ago

gmosx commented 4 years ago

Are there any plans to support WebSocket within Surf?

aldanor commented 3 years ago

Why not just use async-tungstenite?

Fishrock123 commented 3 years ago

Someone in discord was talking about this recently rtyler I think. I don't know their github handle.

It may just be that no one has needed it enough to spend the time, not sure.

yoshuawuyts commented 3 years ago

I think the right ordering to adding websocket support to Surf is:

The reason for this ordering is that we've observed for SSE that the browser's API exposes a subset of what the protocol is capable of delivering. So in order for Surf to continue to work on all platforms we should target the lowest common denominator.

joshtriplett commented 3 years ago

One reason to support this natively: it could integrate with connection reuse, to allow sending a request, getting back a response, and then opening a websocket, all on the same connection.