Skip to content

Make websocket handlers async #3063

Answered by asonix
protortyp asked this question in Ideas
Discussion options

You must be logged in to vote

If you're using actix's actor-based websocket handler, you can use async methods, and you shouldn't use block_on in an actor context.

https://docs.rs/actix/latest/actix/type.ResponseFuture.html
https://docs.rs/actix/latest/actix/type.ResponseActFuture.html

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by robjtede
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants