Daniel Abramov

Results 81 comments of Daniel Abramov

Do you have a SSCCE? I may be wrong, but it might be related to https://github.com/snapview/tokio-tungstenite/issues/29 > let task = client.on_connect(req.headers().get("Authorization");); // This is an async method wrapping around the...

> I kinda think tokio-tungstenite could use some future based authentification process that would suite me better. That indeed would be very useful as it would allow to "inject" some...

To support that, some changes in `tungstenite-rs` (a core of `tokio-tungstenite`) are required. Currently we don't copy the full response when the error happens, but it's possible to do so...

Indeed, your suggestion makes sense, thank you. As a quick workaround I may suggest you to use `futures::lazy()`.

Not supported yet (currently it calls a function from `tungstenite-rs` to implement the callback which is not "async-aware"). But we could eventually add this support in `tokio-tungstenite`.

Currently not planned, but if someone submits a PR, we would be glad to review and merge it.

The thing is that the callback logic is implemented inside `tungstenite-rs` (the base crate), we're just calling it here from Tokio. We could potentially call `spawn_blocking()` [from this function](https://docs.rs/tokio-tungstenite/latest/src/tokio_tungstenite/lib.rs.html#155), but...

Hm, the only noticeable difference that I can spot is that the code that you propose to add to the examples, would send one single message and then only read...

Sorry for the late reply, yeah, you can post it to `tokio`, I mean such things are not strictly speaking about `tokio-tungstenite`, they are rather Tokio related, so I think...

Well, the `Framed` instance does not belong to `tokio_core` anymore (your link points to the old version of tokio). It's part of `tokio_io` as far as I know. To create...