Initial Commit - 1.0.0k

This commit is contained in:
2024-02-27 23:47:25 +08:00
commit 9d14fb1dcb
197 changed files with 99467 additions and 0 deletions

23
engine/http_manager.lua Normal file
View File

@@ -0,0 +1,23 @@
require "love.system"
HTTPS = require('https')
local httpencode = function(str)
str = str..''
local char_to_hex = function(c)
return string.format("%%%02X", string.byte(c))
end
str = str:gsub("\n", "\r\n"):gsub("([^%w _%%%-%.~])", char_to_hex):gsub(" ", "+")
return str
end
if (love.system.getOS() == 'OS X' )and (jit.arch == 'arm64' or jit.arch == 'arm' or true) then jit.off() end
IN_CHANNEL = love.thread.getChannel("http_request")
OUT_CHANNEL = love.thread.getChannel("http_response")
while true do
--Monitor the channel for any new requests
local request = IN_CHANNEL:demand() -- Value from channel
if request then
end
end