From c6033ab136a11e74797f09b89ab4dd35d4af874a Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 1 May 2021 17:37:10 +0200 Subject: [PATCH] Added loop one method to http server. --- core/http_server.cpp | 4 ++++ core/http_server.h | 1 + 2 files changed, 5 insertions(+) diff --git a/core/http_server.cpp b/core/http_server.cpp index 81edfd6..0c73c09 100644 --- a/core/http_server.cpp +++ b/core/http_server.cpp @@ -103,6 +103,10 @@ void HTTPServer::initialize() { listenBuilder->asyncRun(); } +void HTTPServer::loop_once() { + application->update(); +} + void HTTPServer::main_loop() { while (true) { //std::this_thread::sleep_for(std::chrono::seconds(1)); diff --git a/core/http_server.h b/core/http_server.h index d49faca..4489a86 100644 --- a/core/http_server.h +++ b/core/http_server.h @@ -37,6 +37,7 @@ public: virtual void configure(); virtual void initialize(); + void loop_once(); void main_loop(); HTTPServer();