housleyjk / ws-rs

Lightweight, event-driven WebSockets for Rust.
MIT License
1.47k stars 221 forks source link

tokio support #74

Open NeoLegends opened 8 years ago

NeoLegends commented 8 years ago

As part of supporting mio 0.6.0, how about integrating tokio-rs? The ability to provide an external event loop to the library would make composing and using it together with other asynchronous code much easier.

housleyjk commented 8 years ago

This is definitely under review. I can't promise that tokio-rs will be supported, but it is definitely a goal.

lilianmoraru commented 8 years ago

I would also like to register my interest here... I actually went yesterday through all the code to understand it(and try to port it to futures) but it was to much for a single evening to understand how it works. Next weekend I'll get back to it...

housleyjk commented 8 years ago

Thank you! I'm interested in your interest.

NeoLegends commented 8 years ago

Futures (as in performing the handshake and stuff as part of obtaining the Sender) would also be nice. :)

bbigras commented 8 years ago

@lilianmoraru: any progress?

bbigras commented 8 years ago

@lilianmoraru: any progress (it's ok if you didn't have time)?

lilianmoraru commented 8 years ago

@brunoqc I started working on a new interesting project at work, so I completely left all of this and started doing Qt-related stuff in my free time: https://www.youtube.com/watch?v=WIQy0oI6Ijc&t=16s. I don't like that this issue turned into a chat, so I'll remove the previous comments...

housleyjk commented 7 years ago

TL;DR: For tokio support in the near-term, check out tungstenite.

With the advent of tungstenite, I believe that people looking for WebSockets with tokio now have a good option. My plan for WS-RS is to focus first on better integration with raw Mio, so I would recommend tungstenite for people who need or would prefer tokio support today. I did some basic testing of tungstenite, and I am very pleased with it. I ran the little WS-RS bench tool on it and it's currently slightly faster than WS-RS! (test for yourself if you care about the details). Anyway, I believe that that means that tungstenite may be even faster than what the bench tool shows because the bench tool can never really run faster than WS-RS client. It's exciting.

Fedcomp commented 6 years ago

@housleyjk they don't, tungstenite still does not support permessage-deflate