diff options
| author | Martin Ridgers <[email protected]> | 2021-10-15 16:04:56 +0200 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-10-15 16:04:56 +0200 |
| commit | 402dfddf62d979319038801a926809e33839e096 (patch) | |
| tree | e8a8e99c7f4718a5fcc363245cc19e16a41bea25 /zenserver/config.cpp | |
| parent | If/def around Windows-only headers (diff) | |
| parent | httpasio: Implemented support for specifying accept type via url suffix (diff) | |
| download | zen-402dfddf62d979319038801a926809e33839e096.tar.xz zen-402dfddf62d979319038801a926809e33839e096.zip | |
Merged main
Diffstat (limited to 'zenserver/config.cpp')
| -rw-r--r-- | zenserver/config.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp index 394201210..937598a64 100644 --- a/zenserver/config.cpp +++ b/zenserver/config.cpp @@ -81,6 +81,12 @@ ParseUpstreamCachePolicy(std::string_view Options) void ParseGlobalCliOptions(int argc, char* argv[], ZenServerOptions& GlobalOptions, ZenServiceConfig& ServiceConfig) { +#if ZEN_WITH_HTTPSYS + const char* DefaultHttp = "httpsys"; +#else + const char* DefaultHttp = "asio"; +#endif + cxxopts::Options options("zenserver", "Zen Server"); options.add_options()("dedicated", "Enable dedicated server mode", @@ -118,6 +124,13 @@ ParseGlobalCliOptions(int argc, char* argv[], ZenServerOptions& GlobalOptions, Z #endif options.add_option("network", + "", + "http", + "Select HTTP server implementation (asio|httpsys|null)", + cxxopts::value<std::string>(GlobalOptions.HttpServerClass)->default_value(DefaultHttp), + "<http class>"); + + options.add_option("network", "p", "port", "Select HTTP port", |