diff options
| author | ame <[email protected]> | 2024-02-09 13:29:04 -0600 |
|---|---|---|
| committer | ame <[email protected]> | 2024-02-09 13:29:04 -0600 |
| commit | e412e6eaddfa1bc03c7e52ca36a05ff138606d35 (patch) | |
| tree | 39c92afbf5d06d4a3def8254a820d92d37a425c5 /tests/net.lua | |
| parent | 84bf02e17cac724d7898293b5f206408de413cc9 (diff) | |
get silly
Diffstat (limited to 'tests/net.lua')
| -rw-r--r-- | tests/net.lua | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/net.lua b/tests/net.lua index 9a7b49c..705aaab 100644 --- a/tests/net.lua +++ b/tests/net.lua @@ -7,14 +7,16 @@ sleep = function(a) end
end
aea = 5
---_G.wo = llib
+local wowa = 5
+_G.wo = llib
--_G.ww = llib
--llib.io.pprint(_G)
-llib.io.pprint(llib.net.listen(
+
+llib.net.listen(
function(server)
--llib = nil
- llib.io.pprint(_G)
- print("wowa")
+ --llib.io.pprint(_G)
+ _G.server = server
server:all("/*", function(res, req)
--llib.io.pprint(res)
--llib.io.pprint(res)
@@ -31,13 +33,16 @@ llib.io.pprint(llib.net.listen( --print("hi from first")
--llib.io.pprint(llib.crypto.md5("hewwo"))
--_G.sleep(1)
+ _G.llib.io.pprint(_G)
+ --_G.llib.io.pprint(_G.wo.crypto.md5("55"))
end)
server:GET("/aa", function(res, req)
res.header["Content-Type"] = "text/plain"
- --_G.server:lock()
+ _G.server:lock()
res:write("hi\n")
res:write("next")
+ _G.server:unlock()
res:close()
end)
@@ -49,4 +54,4 @@ llib.io.pprint(llib.net.listen( end,
8080
-))
+)
|
