Closed
Description
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 the reply()
method multiple times what would be the right way to do it?
I have also tried to use the set_response_stream
method on web::http::http_request
but I have an exception in this case. Is it doable using Casablanca?
void wwwReports(web::http::http_request request){
json::value reply;
Concurrency::streams::basic_ostream<unsigned char> dataStream;
request.set_response_stream(dataStream);
dataStream.write("data: ");
dataStream.write("test1\n");
}
Thanks for your attention,