First english translations

This commit is contained in:
René Linder 2021-04-29 09:41:41 +02:00
parent d2429b4b9a
commit cca9fb8052
5 changed files with 63 additions and 41 deletions

View file

@ -1,9 +1,18 @@
;lsocket.pbi ;************************
; ;* Library : lsocket.pbi
; Socket Module ;*
; Definition who are not available on linux... ;* Socket based Networkcommuncation Module.
; Simple PureBasic Spech commands. ;*
; ;* Created and develobed by Linder Hard- und Software
;*
;* Current only usable for Linux.
;*
;*
CompilerIf #PB_Compiler_OS <> #PB_OS_Linux
CompilerError "Only for Linux"
CompilerEndIf
DeclareModule lsocket DeclareModule lsocket
Structure sockaddr Structure sockaddr
sa_family.w sa_family.w
@ -22,16 +31,16 @@ DeclareModule lsocket
EndStructure EndStructure
; Socket types: ; Socket types:
#SOCK_STREAM = 1 ; stream (connection) socket #SOCK_STREAM = 1 ; stream (connection) socket
#SOCK_DGRAM = 2 ; datagram (conn.less) socket #SOCK_DGRAM = 2 ; datagram (conn.less) socket
#SOCK_RAW = 3 ; raw socket #SOCK_RAW = 3 ; raw socket
#SOCK_RDM = 4 ; reliably-delivered message #SOCK_RDM = 4 ; reliably-delivered message
#SOCK_SEQPACKET = 5 ; sequential packet socket #SOCK_SEQPACKET = 5 ; sequential packet socket
#SOCK_PACKET = 10 ; linux specific way of #SOCK_PACKET = 10 ; linux specific way of
; getting packets at the dev ; getting packets at the dev
; level. For writing rarp And ; level. For writing rarp And
; other similar things on the ; other similar things on the
; user level. ; user level.
; socket.h ; socket.h
#PF_INET = 2 #PF_INET = 2
@ -95,11 +104,9 @@ Module lsocket
EndProcedure EndProcedure
Procedure CloseSocket(Socket.i) Procedure CloseSocket(Socket.i)
close_(Socket) Protected Feedback.i
Feedback = close_(Socket)
ProcedureReturn Feedback
EndProcedure EndProcedure
EndModule EndModule

View file

@ -1,4 +1,17 @@
;ltls.pbi ;************************
;* Library : ltls.pbi
;*
;* Server side TLS Implementation to communicate encrypted.
;*
;* Created and develobed by Linder Hard- und Software
;*
;* Current only usable for Linux.
;*
;*
CompilerIf #PB_Compiler_OS <> #PB_OS_Linux
CompilerError "Only for Linux"
CompilerEndIf
XIncludeFile "lsocket.pbi" XIncludeFile "lsocket.pbi"

View file

@ -459,21 +459,23 @@ Module lhs_web
If thread_alive = #True If thread_alive = #True
Select m_clients(Str(thread_cli_id))\client_do_cli Select m_clients(Str(thread_cli_id))\client_do_cli
Case #CLI_DO_DataWorking Case #CLI_DO_DataWorking
;Empfang abgeschlossen ;Receive done.
;Buffer Bearbeiten ;Do Buffer work
;Thread in Bearbeitungsmodus Setzen. ;Change Thread to Work mode.
;TODO: Was ist mit zusammenhängenden Datenbuffern grosse Post/Put z.B.
;{ ;{
Debug "Daten vollständig empfangen. Abarbeiten." Debug "Date received, working..."
m_clients(Str(thread_cli_id))\client_do_cli = #CLI_DO_DataWorking m_clients(Str(thread_cli_id))\client_do_cli = #CLI_DO_DataWorking
;Abarbeiten der Anforderung... ;Work on Answer.
ResetList(m_clients(Str(thread_cli_id))\datenbuffer()) ResetList(m_clients(Str(thread_cli_id))\datenbuffer())
;TODO: Only first Buffer have a Header.
While NextElement(m_clients(Str(thread_cli_id))\datenbuffer()) While NextElement(m_clients(Str(thread_cli_id))\datenbuffer())
thread_work = PeekS(m_clients(Str(thread_cli_id))\datenbuffer()\Buffer, m_clients(Str(thread_cli_id))\datenbuffer()\Size, #PB_Ascii) thread_work = PeekS(m_clients(Str(thread_cli_id))\datenbuffer()\Buffer, m_clients(Str(thread_cli_id))\datenbuffer()\Size, #PB_Ascii)
;Header to Map
;Debug "Datenbuffer:"+ Mid(thread_work,1,256) ;Move Header to Map
JSONStringToMap = Work_Header_to_JSONMap(thread_work) JSONStringToMap = Work_Header_to_JSONMap(thread_work)
If JSONStringToMap <> #error_string If JSONStringToMap <> #error_string
MyThreadJSON = ParseJSON(#PB_Any, JSONStringToMap) MyThreadJSON = ParseJSON(#PB_Any, JSONStringToMap)
@ -482,8 +484,8 @@ Module lhs_web
ExtractJSONMap(JSONValue(MyThreadJSON), Header()) ExtractJSONMap(JSONValue(MyThreadJSON), Header())
FreeJSON(MyThreadJSON) FreeJSON(MyThreadJSON)
Else Else
;WTF ??? ;Should not be a case.
Break 2 ; Thread abschiessen Break 2 ; Kill Thread.
EndIf EndIf
Else Else
error_message = #True error_message = #True

View file

@ -8,7 +8,7 @@
<section name="data"> <section name="data">
<explorer view="../../../bin/purebasic/examples/" pattern="0"/> <explorer view="../../../bin/purebasic/examples/" pattern="0"/>
<log show="1"/> <log show="1"/>
<lastopen date="2020-12-10 14:36" user="renlin" host="linux-mvsk"/> <lastopen date="2021-03-26 14:53" user="renlin" host="linux-mvsk"/>
</section> </section>
<section name="files"> <section name="files">
<file name="inc/lweb_file_cache.pbi"> <file name="inc/lweb_file_cache.pbi">
@ -20,7 +20,7 @@
<fingerprint md5="3228c16f329808e2e6e3c6866861ae59"/> <fingerprint md5="3228c16f329808e2e6e3c6866861ae59"/>
</file> </file>
<file name="inc/lweb_helper.pbi"> <file name="inc/lweb_helper.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+-"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+-"/>
<fingerprint md5="61c3c05e25271724318327b0bbd97f87"/> <fingerprint md5="61c3c05e25271724318327b0bbd97f87"/>
</file> </file>
<file name="inc/lweb_helper_header.pbi"> <file name="inc/lweb_helper_header.pbi">
@ -28,19 +28,19 @@
<fingerprint md5="c250ce791b691f679782e5016a3346be"/> <fingerprint md5="c250ce791b691f679782e5016a3346be"/>
</file> </file>
<file name="inc/lweb_http.pbi"> <file name="inc/lweb_http.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+-"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+-"/>
<fingerprint md5="7812984bb6c4bb774cdb01a35588fe2f"/> <fingerprint md5="7812984bb6c4bb774cdb01a35588fe2f"/>
</file> </file>
<file name="inc/lweb_http_header.pbi"> <file name="inc/lweb_http_header.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+-"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+-"/>
<fingerprint md5="d7df8e152291b0f91e8316ad8e00191c"/> <fingerprint md5="d7df8e152291b0f91e8316ad8e00191c"/>
</file> </file>
<file name="inc/lweb_IP.pbi"> <file name="inc/lweb_IP.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+-"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+-"/>
<fingerprint md5="6129682ac18bbfa953feb6f6f6efe65d"/> <fingerprint md5="6129682ac18bbfa953feb6f6f6efe65d"/>
</file> </file>
<file name="inc/lweb_IP_header.pbi"> <file name="inc/lweb_IP_header.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+-"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+-"/>
<fingerprint md5="636558037ff2cab03552fb129e2a4f52"/> <fingerprint md5="636558037ff2cab03552fb129e2a4f52"/>
</file> </file>
<file name="lhttpd.pb"> <file name="lhttpd.pb">
@ -49,23 +49,23 @@
</file> </file>
<file name="lsocket.pbi"> <file name="lsocket.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/>
<fingerprint md5="12de9b9a95358889fb54c69788cba0f2"/> <fingerprint md5="d2c7068cbef9e8086aafb98f73905905"/>
</file> </file>
<file name="ltls.pbi"> <file name="ltls.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/>
<fingerprint md5="efc4d65a4adb80fc827e361e97db90f2"/> <fingerprint md5="2039445441451e5efbfb06a5d695d02f"/>
</file> </file>
<file name="lweb.pbi"> <file name="lweb.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/>
<fingerprint md5="d5a653369623d1188bf1c0e5c87fcd7e"/> <fingerprint md5="046f6480cd2ad72f3b9cb025dca0f810"/>
</file> </file>
<file name="lweb_header.pbi"> <file name="lweb_header.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/>
<fingerprint md5="f793f9a4c222d4688ffd45128d6beacd"/> <fingerprint md5="da9f9d3acca1364e9c78a2410c267ae0"/>
</file> </file>
<file name="server_example.pb"> <file name="server_example.pb">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/> <config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/>
<fingerprint md5="8fd31e2ee49fe63d07942aa8d2672094"/> <fingerprint md5="c69b5870aa1149d4e08f6f6e4fee2a00"/>
</file> </file>
</section> </section>
<section name="targets"> <section name="targets">

View file

@ -2,7 +2,7 @@
;* ;*
;* Lihaso Web Server ;* Lihaso Web Server
;* ;*
;* (c)2015 by Linder Hard- und Software ;* (c)2015 - 2021 by Linder Hard- und Software
;* ;*
;* V0.1 ;* V0.1
;* - Initial Web Server ;* - Initial Web Server