Hello !
I use reqwest create to consume an SSE http response. SSE send "event" over http response without closing it. Like a unidirectional websocket, but as more simple.
To read this SSE response, I use the Response.bytes_stream method which give me a Stream.
Then I use next to get new response lines :
while let Some(thing) = stream.next().await {
// [...]
But stream.next().await
is blocking until new lines are sent. I need to do some things if no message received since 60 seconds. How can I do read the stream with a timeout or without blocking ?
Thanks !