handler: make a single client instance

This commit is contained in:
Vaxry
2025-04-15 15:26:08 +01:00
parent 9460795c92
commit 7fa7d5f7c0
3 changed files with 21 additions and 6 deletions

View File

@@ -11,6 +11,9 @@ class CServerHandler : public Pistache::Http::Handler {
HTTP_PROTOTYPE(CServerHandler)
void init();
void finish();
void onRequest(const Pistache::Http::Request& req, Pistache::Http::ResponseWriter response);
void onTimeout(const Pistache::Http::Request& request, Pistache::Http::ResponseWriter response);
@@ -34,4 +37,6 @@ class CServerHandler : public Pistache::Http::Handler {
std::string token = "";
std::string error = "";
};
Pistache::Http::Experimental::Client* m_client = nullptr;
};