diff options
| author | Dan Engelbrecht <[email protected]> | 2023-09-14 03:54:57 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-14 09:54:57 +0200 |
| commit | e0da430c424192c24f5089ceb97f37062349e9ef (patch) | |
| tree | 2d83811f16839c1133a38b8a05c5ef1074a3701f /src/zenhttp/include | |
| parent | disable access logging on shared instances (#403) (diff) | |
| download | zen-e0da430c424192c24f5089ceb97f37062349e9ef.tar.xz zen-e0da430c424192c24f5089ceb97f37062349e9ef.zip | |
http and httpsys config options (#401)
* Added `--http-threads`, `--httpsys-async-work-threads`, `--httpsys-enable-request-logging` and `--httpsys-enable-async-response` command line options to zenserver
* remove unused CreateHttpSysServer
Diffstat (limited to 'src/zenhttp/include')
| -rw-r--r-- | src/zenhttp/include/zenhttp/httpserver.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/zenhttp/include/zenhttp/httpserver.h b/src/zenhttp/include/zenhttp/httpserver.h index d1a562ee4..c233075be 100644 --- a/src/zenhttp/include/zenhttp/httpserver.h +++ b/src/zenhttp/include/zenhttp/httpserver.h @@ -182,7 +182,20 @@ public: virtual void Close() = 0; }; -Ref<HttpServer> CreateHttpServer(std::string_view ServerClass); +struct HttpServerConfig +{ + std::string ServerClass; // Choice of HTTP server implementation + unsigned int ThreadCount = 0; + + struct + { + unsigned int AsyncWorkThreadCount = 0; + bool IsAsyncResponseEnabled = true; + bool IsRequestLoggingEnabled = false; + } HttpSys; +}; + +Ref<HttpServer> CreateHttpServer(const HttpServerConfig& Config); ////////////////////////////////////////////////////////////////////////// |