Some translations and bugfixes
This commit is contained in:
parent
060e663aaa
commit
a25e1b29ce
2 changed files with 18 additions and 17 deletions
31
lweb.pbi
31
lweb.pbi
|
@ -2,9 +2,9 @@
|
||||||
;*
|
;*
|
||||||
;* lweb-srv.pbi V0.9
|
;* lweb-srv.pbi V0.9
|
||||||
;*
|
;*
|
||||||
;* LiHaSo Webserver Hauptmodule
|
;* LiHaSo Webserver Main module.
|
||||||
;*
|
;*
|
||||||
;* Dieser Webserver ist auch Alleine Nutzbar muss allerdings in einem Hauptprogramm Korrekt zusammengesetzt werden.
|
;* It is usable as standalone Webserver, look at lwebd.pb
|
||||||
;*
|
;*
|
||||||
|
|
||||||
|
|
||||||
|
@ -588,7 +588,7 @@ Module lhs_web
|
||||||
;}
|
;}
|
||||||
|
|
||||||
Else
|
Else
|
||||||
;{ Uncached File Handling scheint stabil zu funktionieren mit Getestet 200 Clients à 100 Requests
|
;{ Uncached file sems to be stable tested up to 200 clients and 100 requests.
|
||||||
thread_file_handle = ReadFile(#PB_Any, conf_basedir + thread_requested,#PB_File_SharedRead)
|
thread_file_handle = ReadFile(#PB_Any, conf_basedir + thread_requested,#PB_File_SharedRead)
|
||||||
If Not thread_file_handle
|
If Not thread_file_handle
|
||||||
thread_file_handle = ReadFile(#PB_Any, conf_basedir + conf_defaultfile,#PB_File_SharedRead)
|
thread_file_handle = ReadFile(#PB_Any, conf_basedir + conf_defaultfile,#PB_File_SharedRead)
|
||||||
|
@ -622,9 +622,9 @@ Module lhs_web
|
||||||
ExtractJSONMap(JSONValue(MyThreadJSON), Post())
|
ExtractJSONMap(JSONValue(MyThreadJSON), Post())
|
||||||
FreeJSON(MyThreadJSON)
|
FreeJSON(MyThreadJSON)
|
||||||
Else
|
Else
|
||||||
;WTF ???
|
;Should not be possible.
|
||||||
Debug "Fehler Absturz"
|
Debug "Error in thread, JSON Convert didn't Work"
|
||||||
Break 2 ; Thread abschiessen
|
Break 2 ; Kill Thread
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
|
@ -641,8 +641,8 @@ Module lhs_web
|
||||||
ToCall = 0
|
ToCall = 0
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
If ToCall > 0 ;Dann ist eine Funktion hinterlegt und zulässig aufgerufen zu werden.
|
If ToCall > 0 ;A dynamic webhandler is available, call.
|
||||||
;{ Dynamischer WebHandler
|
;{ Dynamic webhandler.
|
||||||
|
|
||||||
Select ToCallType
|
Select ToCallType
|
||||||
Case #handler_proto_universal
|
Case #handler_proto_universal
|
||||||
|
@ -714,7 +714,7 @@ Module lhs_web
|
||||||
;}
|
;}
|
||||||
|
|
||||||
Else
|
Else
|
||||||
;{ Uncached File Handling scheint stabil zu funktionieren mit Getestet 200 Clients à 100 Requests
|
;{ Uncached file sems to be stable tested up to 200 clients and 100 requests.
|
||||||
thread_file_handle = ReadFile(#PB_Any, conf_basedir + thread_requested,#PB_File_SharedRead)
|
thread_file_handle = ReadFile(#PB_Any, conf_basedir + thread_requested,#PB_File_SharedRead)
|
||||||
If Not thread_file_handle
|
If Not thread_file_handle
|
||||||
thread_file_handle = ReadFile(#PB_Any, conf_basedir + conf_defaultfile,#PB_File_SharedRead)
|
thread_file_handle = ReadFile(#PB_Any, conf_basedir + conf_defaultfile,#PB_File_SharedRead)
|
||||||
|
@ -803,8 +803,8 @@ Module lhs_web
|
||||||
FreeMemory(m_clients(Str(thread_cli_id))\datenbuffer()\Buffer)
|
FreeMemory(m_clients(Str(thread_cli_id))\datenbuffer()\Buffer)
|
||||||
EndIf
|
EndIf
|
||||||
DeleteElement(m_clients(Str(thread_cli_id))\datenbuffer())
|
DeleteElement(m_clients(Str(thread_cli_id))\datenbuffer())
|
||||||
;Daten Senden...
|
|
||||||
;TODO: SSL Send
|
;Send the data in memory to client.
|
||||||
sent_total = thread_data_size+(thread_buffer_offset-thread_buffer)
|
sent_total = thread_data_size+(thread_buffer_offset-thread_buffer)
|
||||||
If m_clients(Str(thread_cli_id))\client_ssl = 1
|
If m_clients(Str(thread_cli_id))\client_ssl = 1
|
||||||
sent_length = sent_total
|
sent_length = sent_total
|
||||||
|
@ -823,7 +823,6 @@ Module lhs_web
|
||||||
|
|
||||||
Until sent_length <= 0
|
Until sent_length <= 0
|
||||||
sent = sent_total
|
sent = sent_total
|
||||||
;thread_alive = #False
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
sent_length = sent_total
|
sent_length = sent_total
|
||||||
|
@ -841,14 +840,16 @@ Module lhs_web
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
Until sent_length <= 0
|
Until sent_length <= 0
|
||||||
sent = sent_total
|
sent = sent_total
|
||||||
;thread_alive = #False
|
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
If sent = thread_data_size+(thread_buffer_offset-thread_buffer)
|
If sent = thread_data_size+(thread_buffer_offset-thread_buffer)
|
||||||
;Ok
|
;Ok
|
||||||
;Debug "Gesendet:" + PeekS(thread_buffer,thread_buffer_length, #PB_Ascii)
|
;Debug "Gesendet:" + PeekS(thread_buffer,thread_buffer_length, #PB_Ascii)
|
||||||
FreeMemory(thread_buffer)
|
If thread_buffer > 0
|
||||||
|
FreeMemory(thread_buffer)
|
||||||
|
EndIf
|
||||||
|
|
||||||
m_clients(Str(thread_cli_id))\client_do_cli = #CLI_DO_WaitDataReceive
|
m_clients(Str(thread_cli_id))\client_do_cli = #CLI_DO_WaitDataReceive
|
||||||
m_clients(Str(thread_cli_id))\client_do_srv = #SRV_DO_DataReceive
|
m_clients(Str(thread_cli_id))\client_do_srv = #SRV_DO_DataReceive
|
||||||
Else
|
Else
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
;*
|
;*
|
||||||
;* lweb_header.pbi
|
;* lweb_header.pbi
|
||||||
;*
|
;*
|
||||||
;* LiHaSo Webserver Modul Header
|
;* LiHaSo Webserver Modul Header/Declare
|
||||||
;*
|
;*
|
||||||
;* Dieser Webserver ist auch Alleine Nutzbar muss allerdings in einem Hauptprogramm Korrekt zusammengesetzt werden.
|
;* It is usable as standalone Webserver, look at lwebd.pb
|
||||||
;*
|
;*
|
||||||
;*
|
;*
|
||||||
;*
|
;*
|
||||||
|
|
Loading…
Reference in a new issue