summaryrefslogtreecommitdiff
path: root/src/lib/json_server.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-10-29 23:44:29 +0100
committerCarl Hetherington <cth@carlh.net>2025-10-30 00:25:42 +0100
commit35dd1b0ca7c703bae93c46046ee8858a25ce8929 (patch)
tree8fd75c80c0ff7a7be63841cb663d2743de0c437b /src/lib/json_server.h
parent8642e4ecf47b3b0ca0b545061e6f1cfc6237775f (diff)
Move JSONServer State to avoid ODR violation.v2.18.29
Diffstat (limited to 'src/lib/json_server.h')
-rw-r--r--src/lib/json_server.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/json_server.h b/src/lib/json_server.h
index c97e496d1..ade503f88 100644
--- a/src/lib/json_server.h
+++ b/src/lib/json_server.h
@@ -26,6 +26,14 @@ public:
explicit JSONServer (int port);
private:
+ enum State {
+ AWAITING_G,
+ AWAITING_E,
+ AWAITING_T,
+ AWAITING_SPACE,
+ READING_URL,
+ };
+
void run (int port);
void handle (std::shared_ptr<boost::asio::ip::tcp::socket> socket);
void request (std::string url, std::shared_ptr<boost::asio::ip::tcp::socket> socket);