aboutsummaryrefslogtreecommitdiff
path: root/docs/net.md
diff options
context:
space:
mode:
authorame <[email protected]>2024-01-31 11:55:58 -0600
committerame <[email protected]>2024-01-31 11:55:58 -0600
commit1b459e523badaa51cf249390f4b407130e1037fb (patch)
tree4e19be9a8655a9f1a628594e272c16849a9d836e /docs/net.md
parentba70b8aef78bf2de4aff47a1732027388c62f9fd (diff)
docs stuff
Diffstat (limited to 'docs/net.md')
-rw-r--r--docs/net.md26
1 files changed, 16 insertions, 10 deletions
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("<h1>hello world</h1>")
...
```
-#### 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