-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
SSE (Server Sent Events) implementation #11
Comments
The exception could be coming from when our internal implementation tries to read from the dataStream (since it is an output stream). You might want to use a producer_consumer_buffer here. Then you can write to the buffer and our internal implementation can read from the buffer and send the data.
Here, calling sync() will ensure the data is sent out and closing the buffer will complete the response. |
Thanks @kavyako, the proposed solution worked. |
…ompileErrors to master * commit '5befe09bf49c0089bc620e1e2ca15a34d0d9a3b1': fix not used Token compile warning fix unicode wstring and string conversion errors use ApiW from WIndows because we have LPWSTR
Implementation of SSE(Server sent event ) is possible using rest HTTP servers ? |
Hi ... I was able to implement Server Sent Event(SSE) using above proposed solution. |
…eme-and-host Preserve original casing, don't lowercase scheme or host
Hi, I would like to know if it is possible to implement an SSE protocol on top of Casablanca, the main idea would be to send multiple replies to an
web::http::http_request
object whenever new data arrives to be distributed to a connected client, since I cannot use thereply()
method multiple times what would be the right way to do it?I have also tried to use the
set_response_stream
method onweb::http::http_request
but I have an exception in this case. Is it doable using Casablanca?Thanks for your attention,
The text was updated successfully, but these errors were encountered: