From 20d1e814e7f594ae9239ef363ec87ce98c4b5bd1 Mon Sep 17 00:00:00 2001 From: Ground0 Date: Mon, 30 Nov 2020 10:08:21 +0100 Subject: [PATCH] Full Sample rework, bugfix in lweb.pbi --- lweb.pbi | 2 +- server_example.pb | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lweb.pbi b/lweb.pbi index 665300f..3348600 100644 --- a/lweb.pbi +++ b/lweb.pbi @@ -132,7 +132,7 @@ Module lhs_web Global.i file_cache_semaphore_thread = CreateSemaphore() Global NewMap m_file_cache_map.i() Global NewMap m_file_cache.s_file_cache() - Global NewMap m_clients.s_clients(conf_max_clients) + Global NewMap m_clients.s_clients(conf_max_HTTP_clients+conf_max_HTTPS_clients) Global NewMap m_request.s_request_handler() ;} diff --git a/server_example.pb b/server_example.pb index 3648a3d..fa0d0de 100644 --- a/server_example.pb +++ b/server_example.pb @@ -20,9 +20,9 @@ XIncludeFile "lweb.pbi" Define counter, v_lweb_srv_stop -lhs_web::set_config(lhs_web::#conf_port, "8081") +lhs_web::set_config(lhs_web::#conf_HTTP_port, "8081") ;lhs_web::set_config(lhs_web::#conf_binding, "127.0.0.1") -lhs_web::set_config(lhs_web::#conf_binding, "0.0.0.0") +lhs_web::set_config(lhs_web::#conf_HTTP_binding, "0.0.0.0") lhs_web::set_config(lhs_web::#conf_HTTPS_CA, "/home/renlin/dev/libressl/sample/test_ca.pem") lhs_web::set_config(lhs_web::#conf_HTTPS_Cert, "/home/renlin/dev/libressl/sample/test_server_cert.pem") lhs_web::set_config(lhs_web::#conf_HTTPS_Key, "/home/renlin/dev/libressl/sample/test_server_key.pem") @@ -33,7 +33,8 @@ lhs_web::set_config(lhs_web::#conf_HTTPS_Enable, "1") lhs_web::set_config(lhs_web::#conf_defaultfile, "/index.html") lhs_web::set_config(lhs_web::#conf_basedir, "/home/renlin/testweb/") lhs_web::set_config(lhs_web::#conf_error400, "integrated") -lhs_web::set_config(lhs_web::#conf_max_clients, "100") +lhs_web::set_config(lhs_web::#conf_max_HTTP_clients, "100") +lhs_web::set_config(lhs_web::#conf_max_HTTPS_clients, "100") lhs_web::set_config(lhs_web::#conf_cache_enable, "0") ;* ;* includes @@ -137,7 +138,7 @@ Else EndIf If lhs_web::start_server() - Debug "Server gestartet" + lhs_web::get_config(lhs_web::#conf_port) + Debug "Server gestartet" + lhs_web::get_config(lhs_web::#conf_HTTP_port) Else Debug "Fehlgeschlagen" End @@ -146,7 +147,7 @@ EndIf counter = 0 OpenConsole("Test") PrintN("Webserver") -PrintN("HTTP an Port:"+lhs_web::get_config(lhs_web::#conf_port)) +PrintN("HTTP an Port:"+lhs_web::get_config(lhs_web::#conf_HTTP_port)) PrintN("HTTPS an Port:"+lhs_web::get_config(lhs_web::#conf_HTTPS_Port)) PrintN("Press Enter to Exit") Input()