integrate files with serving (even though ugly)

This commit is contained in:
= 2024-12-16 20:17:09 +01:00
parent 63fd2b7cca
commit 897310fe28
7 changed files with 83 additions and 36 deletions

View file

@ -8,6 +8,7 @@
#include <boost/beast/http/string_body.hpp>
#include <boost/beast/http.hpp>
#include <boost/beast/core.hpp>
#include <variant>
using namespace std;
using namespace boost::asio;
@ -25,7 +26,7 @@ private:
ip::tcp::socket socket_;
boost::beast::flat_buffer buffer_;
http::request<http::string_body> request_;
http::response<http::string_body> response_;
variant<http::response<http::string_body>, http::response<http::file_body>> response_;
RequestHandler request_handler_;
void read();