-
Notifications
You must be signed in to change notification settings - Fork 31
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
Implement Server Sent Events #60
Conversation
@CephalonRho, for SSE I use written this, we need to ensure that SEE is covered by JWT authentication if it's enabled, what I need to add below? let sse = warp::path("notifications")
.and(warp::get())
.map(|| {
warp::sse::reply(warp::sse::keep_alive()
.stream(sse_events()))
})
.and(sse_enabled); PS: sometimes we have |
src/server.rs
Outdated
|
||
let (tx, rx) = mpsc::unbounded_channel(); | ||
|
||
tx.send(Message { data: String::from("lol") }).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CephalonRho I don't understand these two lines if I remove it it does not works :/
It works! (like said Apache) Just some things to change:
An example of empty events: |
I Merge #60 to create a Lucid PoC. |
Hey,
This is the first base of the SSE implementation!
Kind regards