diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-05-15 19:36:52 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-05-15 19:36:52 +0200 |
commit | 8fbada6c7542d233afb4677c19a0395f77d32519 (patch) | |
tree | 574e5576352510cc52df82d9629d6e3dfc767518 /config.h | |
parent | 48908fb0bba69404dfd86d1af3b9ace1e0d598c9 (diff) |
Speed up GetPath() with look up table
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -37,6 +37,8 @@ struct Socket std::string port; SocketProtocol protocol; std::unordered_set<std::string> serve_sites; // if empty, automatically expand to all configured sites + + std::unordered_map <std::string, Site*> host_lut; // look up table for fast server decision in GetPath() }; class Config @@ -44,7 +46,9 @@ class Config const std::string default_filename{"/etc/webserver.conf"}; void readConfigfile(std::string filename); + void expand_socket_sites(); void validate(); + void create_look_up_table(); std::string m_user; std::string m_group; |