|
|
|
@ -808,7 +808,9 @@ static void options(int *argc, char ***argv, charp_ht templates) { |
|
|
|
{ "https-cert", 0,0, G_OPTION_ARG_FILENAME, &rtpe_config.https_cert,"Certificate for HTTPS and WSS","FILE"}, |
|
|
|
{ "https-key", 0,0, G_OPTION_ARG_FILENAME, &rtpe_config.https_key, "Private key for HTTPS and WSS","FILE"}, |
|
|
|
{ "http-threads", 0,0, G_OPTION_ARG_INT, &rtpe_config.http_threads,"Number of worker threads for HTTP and WS","INT"}, |
|
|
|
#if LWS_LIBRARY_VERSION_MAJOR >= 3 || (LWS_LIBRARY_VERSION_MAJOR == 2 && LWS_LIBRARY_VERSION_MINOR >= 1) |
|
|
|
{ "http-buf-size", 0,0, G_OPTION_ARG_INT, &rtpe_config.http_buf_size,"Send buffer size for HTTP and WS in kB","INT"}, |
|
|
|
#endif |
|
|
|
{ "software-id", 0,0, G_OPTION_ARG_STRING, &rtpe_config.software_id,"Identification string of this software presented to external systems","STRING"}, |
|
|
|
{ "poller-per-thread", 0,0, G_OPTION_ARG_NONE, &rtpe_config.poller_per_thread, "Use poller per thread", NULL }, |
|
|
|
{ "timer-accuracy", 0,0,G_OPTION_ARG_INT, &rtpe_config.timer_accuracy,"Minimum number of microseconds to sleep","INT"}, |
|
|
|
@ -1052,11 +1054,13 @@ static void options(int *argc, char ***argv, charp_ht templates) { |
|
|
|
die("Missing option --listen-tcp, --listen-udp, --listen-ng, --listen-tcp-ng, " |
|
|
|
"--listen-http, or --listen-https"); |
|
|
|
|
|
|
|
#if LWS_LIBRARY_VERSION_MAJOR >= 3 || (LWS_LIBRARY_VERSION_MAJOR == 2 && LWS_LIBRARY_VERSION_MINOR >= 1) |
|
|
|
static const size_t max_buf_size = |
|
|
|
((1LL << (sizeof(((struct lws_context_creation_info) {}).pt_serv_buf_size) * 8 - 1)) |
|
|
|
- 1) / 1024; |
|
|
|
if (rtpe_config.http_buf_size >= max_buf_size) |
|
|
|
die("Option 'http-buf-size' too large (must be <%zu)", max_buf_size); |
|
|
|
#endif |
|
|
|
|
|
|
|
if (graphitep) { |
|
|
|
if (!endpoint_parse_any_getaddrinfo_full(&rtpe_config.graphite_ep, graphitep)) |
|
|
|
|