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

Make accept_hdr_async accept async callback #222

Closed
jsimonrichard opened this issue Mar 24, 2022 · 3 comments
Closed

Make accept_hdr_async accept async callback #222

jsimonrichard opened this issue Mar 24, 2022 · 3 comments

Comments

@jsimonrichard
Copy link

This is a feature request:

It should be possible to pass an async callback to the accept_hdr_async function. For example, in a header handling function that I'm writing, I need to check the contents of a cookie against a redis cache on my server, and I'm using an asynchronous library to talk to redis. Being able to pass and async function directly to accept_hdr_async would be really helpful.

Let me know what you think.

Right now I'm going to try to use tokio to circumvent this issue, but please let me know if you have any better ideas. Also, let me know if you need anything from me; if I have the time I might submit a PR.

@sdroege
Copy link
Contributor

sdroege commented Mar 24, 2022

See also #159 and sdroege/async-tungstenite#70.

It will require changing the handshake code inside tungstenite to allow running asynchronously.

@jsimonrichard
Copy link
Author

Thanks for getting back to me; I looked through the source code for both tokio-tungstenite and tungstenite, and I see what you mean.

@daniel-abramov
Copy link
Member

That would be a neat feature to have, but so far no one from us, unfortunately, had time to address it. We actually have a tracking issue for that: #159

I'm going to close this issue since it's a duplicate so that we have one issue to track the progress and state (if any).

gregates pushed a commit to gregates/tokio-tungstenite that referenced this issue Feb 24, 2024
…-roots-0.22

Update webpki-roots requirement from 0.21 to 0.22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants