Add example chunked encoding response

This commit is contained in:
2022-06-30 02:08:09 +02:00
parent 7b93dfa6cf
commit fb84784d1c
14 changed files with 216 additions and 11 deletions
+16 -3
View File
@@ -1,12 +1,25 @@
#include <QLoggingCategory>
// esp-idf includes
#include <esp_log.h>
#include <asio.hpp>
#include <esp_log.h>
// 3rdparty lib includes
#include <cpputils.h>
#include <cppmacros.h>
// local includes
#include "examplewebserver.h"
namespace {
constexpr const char * const TAG = "ASIO_WEBSERVER";
} // namespace
int main(int argc, char *argv[])
{
CPP_UNUSED(argc)
CPP_UNUSED(argv)
qSetMessagePattern(QStringLiteral("%{time dd.MM.yyyy HH:mm:ss.zzz} "
"["
"%{if-debug}D%{endif}"
@@ -19,9 +32,9 @@ int main(int argc, char *argv[])
"%{message}"));
asio::io_context io_context;
ExampleWebserver server{io_context, (short int)8080};
ExampleWebserver server{io_context, (unsigned short)8080};
ESP_LOGI("running mainloop");
ESP_LOGI(TAG, "running mainloop");
io_context.run();
}