cpp Rest API master
C++ library for REST API access with Qt, Curl and cpp-httplib backends
 
Loading...
Searching...
No Matches
sse_parser.hpp
Go to the documentation of this file.
1#ifndef SSE_PARSER_HPP_INCLUDED
2#define SSE_PARSER_HPP_INCLUDED
3
4#include <string>
5#include <vector>
6
7#include "cpp_restapi_export.h"
8#include "sse_event.hpp"
9
10
11namespace cpp_restapi
12{
21 class CPP_RESTAPI_EXPORT SseParser
22 {
23 public:
29 std::vector<SseEvent> feed(const std::string& chunk);
30
31 private:
32 std::string m_buffer;
33 };
34}
35
36#endif
Incremental parser for Server-Sent Events stream.
Definition sse_parser.hpp:22
std::vector< SseEvent > feed(const std::string &chunk)
Feed raw data from the SSE stream.
Definition base_connection.hpp:13