Incremental parser for Server-Sent Events stream. More...
#include <sse_parser.hpp>
Public Member Functions | |
| std::vector< SseEvent > | feed (const std::string &chunk) |
| Feed raw data from the SSE stream. | |
Incremental parser for Server-Sent Events stream.
Accumulates raw data from an SSE stream and extracts complete events as they become available. Implements parsing rules from the SSE specification: https://html.spec.whatwg.org/multipage/server-sent-events.html
| std::vector< SseEvent > cpp_restapi::SseParser::feed | ( | const std::string & | chunk | ) |
Feed raw data from the SSE stream.
| chunk | raw bytes received from the HTTP response |