Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
TCPStartup()
|
||||
$socket = TCPListen("0.0.0.0",8080)
|
||||
$string = "Goodbye, World!"
|
||||
While 1
|
||||
Do
|
||||
$newConnection = TCPAccept($socket)
|
||||
Sleep(1)
|
||||
Until $newConnection <> -1
|
||||
$content = TCPRecv($newConnection, 2048)
|
||||
If StringLen($content) > 0 Then
|
||||
TCPSend($newConnection, Binary("HTTP/1.1 200 OK" & @CRLF))
|
||||
TCPSend($newConnection, Binary("Content-Type: text/html" & @CRLF))
|
||||
TCPSend($newConnection, Binary("Content-Length: "& BinaryLen($string) & @CRLF & @CRLF))
|
||||
TCPSend($newConnection, $string)
|
||||
EndIf
|
||||
TCPCloseSocket($newConnection)
|
||||
WEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue