salvo-rs / salvo

A powerful web framework built with a simplified design.
https://salvo.rs
Apache License 2.0
3.26k stars 197 forks source link

Add compression support to websockets #872

Closed rxdiscovery closed 1 month ago

rxdiscovery commented 1 month ago

Hello,

It would be very useful to add compression support to websocket to optimize bandwidth, here's the header that must be interpreted to activate compression

Sec-WebSocket-Extensions: permessage-deflate

Thanks in advance.

chrislearn commented 1 month ago

salvo does not implement websocket directly, it depends on tokio-tungstenite, so this requires tokio-tungstenite to provide support.

https://github.com/snapview/tokio-tungstenite/pull/251

rxdiscovery commented 1 month ago

@chrislearn Thank you very much for your responsiveness, I'll look into it.