summaryrefslogtreecommitdiffstats
path: root/BrowserSource/Proxy/WebServer.h
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2023-09-13 21:43:33 -0700
committeryum <yum.food.vr@gmail.com>2023-09-13 21:55:05 -0700
commit703e183e430f15aff6005d38aefcacf91e2314cd (patch)
tree93f647cf7e4be14e36fa9d9b79ea9717fe93e417 /BrowserSource/Proxy/WebServer.h
parent8fcc6c248554a0b08ecd4b43cc0971b78810c080 (diff)
General cleanupv0.15.3
Remove unused proxy code, curl, and images.
Diffstat (limited to 'BrowserSource/Proxy/WebServer.h')
-rw-r--r--BrowserSource/Proxy/WebServer.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/BrowserSource/Proxy/WebServer.h b/BrowserSource/Proxy/WebServer.h
deleted file mode 100644
index 7815e89..0000000
--- a/BrowserSource/Proxy/WebServer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-
-#include <functional>
-#include <future>
-#include <map>
-#include <mutex>
-#include <string>
-#include <vector>
-
-#include "WebCommon.h"
-
-namespace WebServer {
- class WebServer {
- public:
- WebServer(std::uint16_t port);
-
- typedef std::function<void(
- int& status_code,
- std::string& payload,
- ContentType& type)> handler_t;
-
- bool RegisterPathHandler(const std::string& method,
- const std::string& path, handler_t&& handler);
- void RegisterDefaultHandler(handler_t&& handler);
-
- bool Run(volatile bool* run);
-
- private:
- // Dispatch requests by mapping from (method, path) to handler.
- // Dispatch key is (method, path) in that order.
- typedef std::tuple<std::string, std::string> dispatch_key_t;
- static inline dispatch_key_t GetDispatchKey(const std::string& method, const std::string& path)
- {
- return dispatch_key_t(method, path);
- }
-
- typedef std::map<dispatch_key_t, handler_t> dispatch_map_t;
- dispatch_map_t dispatch_map_;
- handler_t default_handler_;
-
- const uint16_t port_;
-
- std::vector<std::future<void>> connections_;
- };
-}
-