2019-05-05 00:11:57 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
#include "firecgi/request.h"
|
|
|
|
|
|
|
|
|
|
namespace firesse {
|
|
|
|
|
|
|
|
|
|
class Stream {
|
|
|
|
|
public:
|
2019-05-07 23:26:48 -07:00
|
|
|
Stream(firecgi::Request* request);
|
2019-05-05 00:11:57 -07:00
|
|
|
|
|
|
|
|
[[nodiscard]] bool WriteEvent(const std::string& data, uint64_t id=0, const std::string& type="");
|
|
|
|
|
bool End();
|
|
|
|
|
|
|
|
|
|
private:
|
2019-05-07 23:26:48 -07:00
|
|
|
firecgi::Request* request_;
|
2019-05-05 00:11:57 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace firesse
|