Skip to content

Commit

Permalink
Fixed build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yhirose committed Jul 25, 2020
1 parent 9ca1fa8 commit 366d073
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions example/sse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ int main(void) {

svr.Get("/event1", [&](const Request & /*req*/, Response &res) {
cout << "connected to event1..." << endl;
res.set_header("Content-Type", "text/event-stream");
res.set_chunked_content_provider([&](size_t /*offset*/, DataSink &sink) {
ed.wait_event(&sink);
return true;
});
res.set_chunked_content_provider("text/event-stream",
[&](size_t /*offset*/, DataSink &sink) {
ed.wait_event(&sink);
return true;
});
});

svr.Get("/event2", [&](const Request & /*req*/, Response &res) {
cout << "connected to event2..." << endl;
res.set_header("Content-Type", "text/event-stream");
res.set_chunked_content_provider([&](size_t /*offset*/, DataSink &sink) {
ed.wait_event(&sink);
return true;
});
res.set_chunked_content_provider("text/event-stream",
[&](size_t /*offset*/, DataSink &sink) {
ed.wait_event(&sink);
return true;
});
});

thread t([&] {
Expand Down

0 comments on commit 366d073

Please sign in to comment.