Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: async_tungstenite #541

Open
0xJepsen opened this issue Jul 24, 2024 · 1 comment
Open

question: async_tungstenite #541

0xJepsen opened this issue Jul 24, 2024 · 1 comment

Comments

@0xJepsen
Copy link

0xJepsen commented Jul 24, 2024

//! The following code is adapted from https://github.com/tokio-rs/axum/blob/axum-v0.7.3/axum/src/extract/ws.rs
//! where we swapped out tokio_tungstenite (https://docs.rs/tokio-tungstenite/latest/tokio_tungstenite/)
//! with async_tungstenite (https://docs.rs/async-tungstenite/latest/async_tungstenite/) so that we can use
//! ws_stream_tungstenite (https://docs.rs/ws_stream_tungstenite/latest/ws_stream_tungstenite/index.html)
//! to get AsyncRead and AsyncWrite implemented for the WebSocket. Any other modification is commented with the prefix "NOTARY_MODIFICATION:"

I am curious if would be better to use this fork of ws_stream_tungstenite and use tokio_tungstenite all the way up. The reason i am curious in this is that it seams to be the case to me that tokio_tungstenite has matured and become more of the standard and now has the support for the async properties that async_tungstenite initially added. These now seems to make a fully stale toolchain which ws_stream_tungstenite is a part of.

@sinui0
Copy link
Member

sinui0 commented Jul 25, 2024

I'm for switching to tokio_tungstenite 👍 We would need your fork to be on crates.io before switching, happy to accept PR afterwards. I do wonder if there is already a good alternative to ws_stream_tungstenite built on tokio_tungstenite? I feel using it as a duplex bytestream must be common enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants