Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,36 @@
//compile with dylan.NET 11.5.1.2 or later!!
#refstdasm "mscorlib.dll"
#refstdasm "System.dll"
import System.Text
import System.Net.Sockets
import System.Net
assembly helloweb exe
ver 1.1.0.0
namespace WebServer
class public GoodByeWorld
method public static void main(var args as string[])
var msg as string = c"<html>\n<body>\nGoodbye, world!\n</body>\n</html>\n"
var port as integer = 8080
var serverRunning as boolean = true
var tcpListener as TcpListener = new TcpListener(IPAddress::Any, port)
tcpListener::Start()
do while serverRunning
var socketConnection as Socket = tcpListener::AcceptSocket()
var bMsg as byte[] = Encoding::get_ASCII()::GetBytes(msg::ToCharArray(), 0, msg::get_Length())
socketConnection::Send(bMsg)
socketConnection::Disconnect(true)
end do
end method
end class
end namespace