split into src and lib and socket changes
* libanthracite files are now all in lib/ * anthracite-bin + anthracite-api-bin files are now all in src/ * socket split into header and source properly
This commit is contained in:
parent
fba87f3fbb
commit
71be773d49
24 changed files with 49 additions and 121 deletions
22
lib/backends/file_backend.hpp
Normal file
22
lib/backends/file_backend.hpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include "backend.hpp"
|
||||
|
||||
namespace anthracite::backends {
|
||||
|
||||
class file_backend : public backend {
|
||||
private:
|
||||
std::unordered_map<std::string,std::string> file_cache;
|
||||
std::string file_dir;
|
||||
|
||||
std::unique_ptr<http::response> handle_request_cache(http::request& req);
|
||||
void populate_cache_dir(std::string dir);
|
||||
void populate_cache();
|
||||
public:
|
||||
file_backend(std::string dir = "./www") ;
|
||||
|
||||
std::unique_ptr<http::response> handle_request(http::request& req) override;
|
||||
std::unique_ptr<http::response> handle_error(const http::status_codes& error);
|
||||
};
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue