How to cancel Stream when client disconnect. #2203
Replies: 2 comments
-
I'll try sse package first. |
Beta Was this translation helpful? Give feedback.
0 replies
-
please see this demo: https://github.com/tokio-rs/axum/blob/main/examples/sse/src/main.rs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,I am new to Rustlang and Axum, and still struggling with the learning curve. Any help would be appreciated.
I am trying to use Axum to write a HTTP API that subscribes to Redis channels. So I used StreamBody to response with a stream to the client. Here’s what it looks like:
These are my questions:
poll_next
is still called and printspoll next
.Here’s a runnable demo: https://github.com/terrencehan/axum_streambody_example
Thanks
Beta Was this translation helpful? Give feedback.
All reactions