Full Sample rework, bugfix in lweb.pbi

This commit is contained in:
René Linder 2020-11-30 10:08:21 +01:00
parent d20b7ddd55
commit 20d1e814e7
2 changed files with 7 additions and 6 deletions

View file

@ -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()
;}

View file

@ -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()