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:
Nicholas Orlowsky 2025-02-04 11:37:46 -05:00
parent fba87f3fbb
commit 71be773d49
Signed by: nickorlow
GPG key ID: 838827D8C4611687
24 changed files with 49 additions and 121 deletions

View 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);
};
};