Everything 'should' just work
This commit is contained in:
@@ -14,7 +14,8 @@ using namespace std;
|
||||
struct MetricsExporter {
|
||||
static void serve(shared_ptr<unordered_map<uint32_t, Crawler>> crawler);
|
||||
static void process_request(int client_fd);
|
||||
static void send_data(int client_fd, const string& data);
|
||||
};
|
||||
|
||||
inline string HEAD = "HTTP/1.1 200 OK\r\nContent-Type: text/plain; version=0.0.4\r\n\r\n";
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@ class ServerUtils {
|
||||
static void send_css(int client_fd);
|
||||
static void send_data(int client_fd, const string& data);
|
||||
static void send_image(int client_fd, const string& path, image_type type);
|
||||
static size_t send_all(int client_fd, const char* data, size_t length);
|
||||
static uint32_t get_ip_2(int client_fd);
|
||||
static uint32_t get_ip(int client_fd);
|
||||
};
|
||||
|
||||
const string HTML_RESPONSE_HEADER =
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ struct Track {
|
||||
string UserAgent;
|
||||
};
|
||||
|
||||
#endif //TRACK_H
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,6 @@ struct WordUtils {
|
||||
static unordered_map<string, unordered_map<string, int>> load_data(const string& path);
|
||||
static string load_css(const string& path);
|
||||
static vector<string> predict_next_word(const string& input, const unordered_map<string, unordered_map<string, int>>& word_frequencies, size_t count);
|
||||
static vector<string> predict_next_word_2(const string& input, const unordered_map<string, unordered_map<string, int>>& word_frequencies, size_t count);
|
||||
static string load_file(const string& path);
|
||||
static vector<string> split_string(const string& input, data_type type);
|
||||
static string extract_url(const string& input);
|
||||
@@ -20,7 +19,6 @@ struct WordUtils {
|
||||
static bool contains_image(const string& input);
|
||||
static string extract_image_name(const string& input);
|
||||
static string create_tag(const unordered_map<string, unordered_map<string, int>>& word_frequencies, const char& hash);
|
||||
static string create_tag_2(const unordered_map<string, unordered_map<string, int>>& word_frequencies, const char& hash);
|
||||
static string create_link(const unordered_map<string, unordered_map<string, int>>& word_frequencies, unsigned long hash);
|
||||
static string create_image(const string& image);
|
||||
static unsigned int hash_url(const string& input);
|
||||
|
||||
Reference in New Issue
Block a user