// // Created by skingging on 5/16/25. // #ifndef METRICSEXPORTER_H #define METRICSEXPORTER_H #include #include #include "../include/Crawler.h" using namespace std; struct MetricsExporter { static void serve(shared_ptr> crawler); static void process_request(int client_fd); static void send_data(int client_fd, const string& data); }; const string HTML_RESPONSE_HEADER_lol = "HTTP/1.1 200 OK\r\n" "Content-Type: text/html; charset=utf-8\r\n" "Transfer-Encoding: chunked\r\n" //"Cache-control: max-age=12000\r\n" "Connection: close\r\n\r\n"; const string BEGINNING = "\n\r\n" "Drip\r\n" "\r\n"; const string END = "\r\n"; #endif