From 1b459e523badaa51cf249390f4b407130e1037fb Mon Sep 17 00:00:00 2001 From: ame Date: Wed, 31 Jan 2024 11:55:58 -0600 Subject: docs stuff --- docs/net.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'docs/net.md') diff --git a/docs/net.md b/docs/net.md index 192048e..b75ae46 100644 --- a/docs/net.md +++ b/docs/net.md @@ -6,6 +6,12 @@ the function will be ran on initilization, the argument has info on the server and functions to set it up +** +right now everything within a server:GET function is completley local, cannot access the global context at all, +i am planning on copying the global state to each thread (optionally ofc) to make the global state read only, and maybe +and option to sync the global state (push and pull seperately) +** + ```lua llib.net.listen(function(server) ... @@ -61,6 +67,16 @@ end) ... ``` +#### res:deny ** + +denies request as if there was no server + +```lua +... +res:deny() --make the client timeout, lol +... +``` + #### res:send 'takes a string @@ -73,16 +89,6 @@ res:send("

hello world

") ... ``` -#### res:set ** - -'takes an even number of strings, key and value pairs - -set the key to value in the response header, certain keys will affect other values or have other side effects on res:send, listed below - -|key|side effect| -|--|--| -|Code|Changes response note, ie: (200: OK)| - #### res:close ** closes connection -- cgit v1.2.3